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

base JSON value objects on unordered maps #88

Open
pfps opened this issue Jun 27, 2024 · 2 comments
Open

base JSON value objects on unordered maps #88

pfps opened this issue Jun 27, 2024 · 2 comments
Labels
propose closing Proposed for closing spec:editorial Minor issue or proposed change in the specification (markup, typo, informative text)

Comments

@pfps
Copy link
Contributor

pfps commented Jun 27, 2024

The value space still contains orderd maps (with insignicant order). It would be much better to start out with a map datatype that is unordered instead of going through all the contortions to try to eliminate all vestiges of the order.

https://en.wikipedia.org/wiki/Associative_array appears to be a reasonable reference for an unordered finite map.

@gkellogg
Copy link
Member

As I've said elsewhere, we use INFRA (to the degree possible) for describing our values. INFRA is used in many W3C specs typically for representing that values associated with JSON strings. It would be unusual for our value space to use everything from INFRA except (ordered) map. Practically speaking, when parsing a JSON Object, implementations will construct the map in sequence, and there are cases where preserving this order is useful. But, the JSON model is that map entries are unordered, which really only becomes significant when comparing two maps, which we provide for. Maps are accessed by key, so ordinal location of a map entry within a map is not important.

My opinion remains that we should continue to use the INFRA map definition.

@pfps
Copy link
Contributor Author

pfps commented Jun 27, 2024

OK, but then you are responsible for ensuring that all the messiness of using an ordered map is handled. I have provided an alternative that requires fewer complications.

@pfps pfps added the spec:editorial Minor issue or proposed change in the specification (markup, typo, informative text) label Jun 28, 2024
@gkellogg gkellogg added the propose closing Proposed for closing label Oct 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
propose closing Proposed for closing spec:editorial Minor issue or proposed change in the specification (markup, typo, informative text)
Projects
None yet
Development

No branches or pull requests

2 participants