3 ms·
I only wish that JSON had a slightly less verbose format for array types with records with fixed number of columns: example: instead of the following: [{"fiel
by pkphilip 4y ago
I only wish that JSON had a slightly less verbose format for array types with records with fixed number of columns:
example: instead of the following:
[{"field1":"value", "field2":"value", "field3":"value"}, {"field1":"value1", "field2":"value2", "field3":"value3"}, {"field1":"value3", "field2":"value3", "field3":"value4"}]
If you could have this instead:
[{"columns": {"field1", "field2", "field3"}, "rows": [{"value1,"value2","value3"},{"value1,"value2","value3"},{"value1,"value2","value3"}]
If json parser could then have the smarts to return the values by position for the various field names even though each row does not include the field names.
- RedShift1 4y agoIf you use compression, it's a non-issue.
- IggleSniggle 4y agoIt’s still an issue for the “readable by humans” use case as it dramatically reduces readability?
- 5Qn8mNbc2FNCiVV 4y agoIt's JavaScript Object Notation. An array of objects looks like that, if you want to have another data structure you can do it and have the accompanying code to consume it. The only thing holding you back from doing that is 1kb of JS as the second argument to JSON.parse