quinnj / JSON3.jl

Other
214 stars 47 forks source link

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

Closed stensmo closed 1 month ago

stensmo commented 1 month ago

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 commented 1 month ago

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 commented 1 month ago

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".