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

JSON3.jl does not comply with the JSON specification #289

Closed
stensmo opened this issue Sep 9, 2024 · 2 comments
Closed

JSON3.jl does not comply with the JSON specification #289

stensmo opened this issue Sep 9, 2024 · 2 comments

Comments

@stensmo
Copy link

stensmo commented Sep 9, 2024

When generating types from JSON, you notice that JSON3.jl is not compliant with the JSON specification. "An object is an unorderedset of name/value pairs". The solution is to have a compliance mode where you always sort the name/value pairs, and you can have a performance mode where you don't sort them. For JSON3, you get a new type with a digit after, even if it is the same type (with different order, which is unimportant).

https://filemakerhacks.com/2020/04/29/ordering-elements-within-json-objects/

@quinnj
Copy link
Owner

quinnj commented Sep 9, 2024

I don't follow/understand what you're saying here. Can you give an example of how JSON3 is not conforming to the specification please?

@stensmo
Copy link
Author

stensmo commented Sep 9, 2024

Did more testing, and my headline is wrong, so you can close this issue and I will open a new one. The bug is only triggered when you get output from this line: @info "struct with name $struct_name already exists, changing name to $new_struct_name".

@quinnj quinnj closed this as completed Sep 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants