Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow any type in enums #100

Open
mjkoster opened this issue Jan 17, 2020 · 3 comments
Open

Allow any type in enums #100

mjkoster opened this issue Jan 17, 2020 · 3 comments
Assignees
Labels
Blocks R1 This blocks model conversion for one or more device sources bug Something isn't working Resolved

Comments

@mjkoster
Copy link
Contributor

relax numbering requirement as we did for "id" quality

@mjkoster mjkoster self-assigned this Jan 17, 2020
@mjkoster mjkoster added bug Something isn't working Blocks R1 This blocks model conversion for one or more device sources labels Jan 17, 2020
mjkoster added a commit that referenced this issue Jan 17, 2020
enum items can be any type (issue #100)
add float subtype (issue #92)
@mjkoster
Copy link
Contributor Author

PR #101

@cabo
Copy link
Member

cabo commented Jan 17, 2020

One problem with making enums just sets of strings is that when an actual string occurs in the interchange, you don't know which of the enums it is from.
So "down" might be the from the "state of a server" enum, from the "direction of arrow" enum, from the "filling material of pillow" enum etc.
Namespacing the strings helps with that. URIs are one kind of namespacing, which happens to be both well understood and well-supported by RDF.

@WAvdBeek
Copy link
Collaborator

enums can be anything, it does not have to be an number.
enums in JSON can be a list of strings, list of numbers/integers can even an combination of those (which I do not recommend)
hence this is not the C-style enum where each definition can be regarded as an definition of an integer value, using the definition as the description what it means.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Blocks R1 This blocks model conversion for one or more device sources bug Something isn't working Resolved
Projects
None yet
Development

No branches or pull requests

3 participants