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

Need a comparison with other C JSON libraries #15

Open
eyalroz opened this issue Oct 19, 2021 · 5 comments
Open

Need a comparison with other C JSON libraries #15

eyalroz opened this issue Oct 19, 2021 · 5 comments

Comments

@eyalroz
Copy link

eyalroz commented Oct 19, 2021

There are several C libraries for JSON parsing which are relatively or very popular, even here on GitHub (e.g. json-c, cJSON, janson). It would help if you could post a comparison of the foci, strengths and weaknesses of these other libraries vis-a-vis oj. It could be a Wiki page or a README section.

Now, it's true that the best comparison would be some third-party surveying multiple libraries impartially, but - it is also meaningful to read library authors' explanations of why they "rolled their own" rather than using an existing library; and what they see as the main differences.

@ohler55
Copy link
Owner

ohler55 commented Oct 20, 2021

There is a comparison with simdjson here. What do you think about just expanding that to include other libraries?

Also, note the fun race comparison: https://github.com/ohler55/ojc/blob/master/misc/compete.md

@eyalroz
Copy link
Author

eyalroz commented Oct 20, 2021

What do you think about just expanding that to include other libraries?

Well simdjson is C++, but that's certainly useful. Now, what I see in that comparison are supported features and performance figures; it would be great to have this for other C-language JSON libraries. However, when the language is the same, it's also useful to compare the API. Still, whatever you feel like writing would help.

@ohler55
Copy link
Owner

ohler55 commented Oct 20, 2021

APIs are somewhat subjective in so it's tough to rate them but with the benchmarks in place there will be coding examples of the API use.

@eyalroz
Copy link
Author

eyalroz commented Oct 20, 2021

It's not about rating, it's just "here's how you do X with oj, and here's how you do it with this other library".

@ohler55
Copy link
Owner

ohler55 commented Oct 20, 2021

Ok, I think benchmark code would demonstrate use. I'll make this a lower priority task for now though.

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