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

discussion: why not just JSON with some conventions ? #8

Open
setop opened this issue Jul 21, 2022 · 0 comments
Open

discussion: why not just JSON with some conventions ? #8

setop opened this issue Jul 21, 2022 · 0 comments

Comments

@setop
Copy link

setop commented Jul 21, 2022

The rational of JSON is to propose a trade off between human readable (view and modify in a text editor) and machine processable (easy parser, basic typing, reasonably fast).

JCOF makes a very small progress to the right (more clever encoding) but a huge regression on the left (unreadable).

Here the use case seems very tabular data oriented. There are text format like TSV/CSV for that.

If the point is to reduce the overhead of JSON when encoding tabular data, it can be done as below:

{ "peoples" :
{ "_headers"  : ["age","first-name","full-time","occupation"],
"_records" : [
,[32,"Bob",true,"Plumber"]
,[28,"Alice",true,"Programmer"]
,[36,"Bernard",null,null]
,[57,"El",false,"Programmer"]
]}}

Thanks for the experimentation, data encoding is always interesting

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

1 participant