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

Add more JSON libaries #9

Open
12 of 16 tasks
miloyip opened this issue Apr 16, 2015 · 31 comments
Open
12 of 16 tasks

Add more JSON libaries #9

miloyip opened this issue Apr 16, 2015 · 31 comments

Comments

@miloyip
Copy link
Owner

miloyip commented Apr 16, 2015

Above released in v1.0.0


@miloyip
Copy link
Owner Author

miloyip commented Apr 17, 2015

sajson was added in https://github.com/miloyip/nativejson-benchmark/tree/sajson branch but it is unable to parse twitter.json. Reported as chadaustin/sajson#7.


Confirmed it is fixed.

@miloyip miloyip changed the title Add more JSON parseres Add more JSON libaries Apr 17, 2015
@miloyip
Copy link
Owner Author

miloyip commented Apr 17, 2015

JSON Voorhees fails to compile on 32-bit target. Reported as tgockel/json-voorhees#53.

@miloyip
Copy link
Owner Author

miloyip commented Apr 18, 2015

ArduinoJson was added in https://github.com/miloyip/nativejson-benchmark/tree/ArduinoJson branch. But it cannot parse properly due to stack overflow. Reported as bblanchon/ArduinoJson#65.


Confirmed it is fixed.

@miloyip
Copy link
Owner Author

miloyip commented Apr 19, 2015

nbsdx/SimpleJSON was added but there seems no way to iterate object and array. Reported as nbsdx/SimpleJSON#1.


Update:The functions were added. And statistics has been completed.

@miloyip
Copy link
Owner Author

miloyip commented Apr 19, 2015

jbson seems not working widely:

Requires codecvt header (C++11, missing in gcc-4.8 & gcc-4.9 stdlib), various template aliases (C++14), probably more where gcc's stdlib is behind on the standard.
Known only to work with an up-to-date libc++ currently.

Thus not add it at this moment.

@miloyip
Copy link
Owner Author

miloyip commented Apr 22, 2015

ArduinoJson crashes when printing big number in conformance test. Reported as bblanchon/ArduinoJson#67.

@xor-gate
Copy link
Contributor

@miloyip as a notice the Nlohmann/json has released v1.0.0, 16 days ago and would be worth to update. (Crossref: nlohmann/json#177)

@starwing
Copy link

@miloyip hello, I want to find a pure C, easy to use and intergrated json library, I found these:

maybe these can be added into benchmark, I found libraries here, Thanks for these good results :-)

@denji
Copy link

denji commented Jan 18, 2016

Homepage: http://zserge.com/jsmn.html
Code: https://github.com/zserge/jsmn

FEATURES
  • simple
  • highly portable (tested on x86/amd64, ARM, AVR)
  • compatible with C89
  • no dependencies (even libc!)
  • no dynamic memory allocation
  • extremely small code footprint - it’s just about 200 LOC
  • API has only 2 functions
  • incremental single-pass parsing
  • library code is covered with tests

js_perf

miloyip added a commit that referenced this issue Jan 19, 2016
@nlohmann
Copy link
Contributor

@miloyip, thanks for updating nlohmann/json to 1.0.0. Is there a way to have a look at the new results?

@miloyip
Copy link
Owner Author

miloyip commented Jan 21, 2016

@nlohmann I will rerun the benchmarks after adding a few more libraries. You may also run it locally as well.

@xor-gate
Copy link
Contributor

@miloyip is there no way to automate running the benchmarks with continues integration. E.g Travis CI ?

@miloyip
Copy link
Owner Author

miloyip commented Jan 21, 2016

@xor-gate Ideally of course that will be the best.
However, do you know any free service can provide stable performance environment?
Travis does not guarantee what build machine will be used, and how many concurrent builds (other users) will be running.

@xor-gate
Copy link
Contributor

You are right about that, I have overseen this. But a colleague tried to run the tests but he could not get it to work. Maybe a alternative would be to have the test suite executable automatically build under Docker. With a Dockerfile supplied, e.g Debian Jessie as base image then people can easy reproduce binaries and run on real metal.

@miloyip
Copy link
Owner Author

miloyip commented Jan 21, 2016

I understand there is difficult to build and run the tests. I faced these problems often as well.
The docker idea seems interesting. I have not tried docker before, not sure if there is potential problems.
Ideally the dockerfile is built in CI to make it always up-to-date. If you can help on trying this it will be great.

@xor-gate
Copy link
Contributor

@miloyip I will open a separate issue for this so we when I need some help we can discus there. I will give it a shot this weekend.

@miloyip
Copy link
Owner Author

miloyip commented Jan 22, 2016

@starwing json.h done

@miloyip
Copy link
Owner Author

miloyip commented Jan 23, 2016

@starwing There are some issues when integrating MMX vurtun/lib#3

@miloyip
Copy link
Owner Author

miloyip commented Jan 24, 2016

@starwing Sigh... the author of mmx has removed the mm_json.h. I think I have not provoked him anyway vurtun/lib#3

@denji
Copy link

denji commented Jan 24, 2016

malloc() we can wrap jemalloc, scalloc, hoard (LD_PRELOAD) [1] [2]

@nlohmann
Copy link
Contributor

Hey @miloyip, today I released version 1.1.0 of JSON for Modern C++. It would be great if you could update it in your benchmark.

This release also fixes some bugs that have been detected with your floating-point tests. :-)

@miloyip
Copy link
Owner Author

miloyip commented Jan 25, 2016

@nlohmann It's done. BTW, I just added a FAQ for updating libraries. Welcome for updating it via pull request. Good to know this test has helped improving your library 😄

@starwing
Copy link

@miloyip so sad things :(

But still very thank you for the work!!

miloyip added a commit that referenced this issue Feb 4, 2016
@StephaneG31
Copy link

@miloyip do you think FlatBuffers may have a place in your benchmark ?

@xor-gate
Copy link
Contributor

In my opinion, this is a different format (just like MessagePack, Protocol Buffers, BSON) and should not be added to the nativejson-benchmark. As the name contains ... json.

@StephaneG31
Copy link

@xor-gate FlatBuffers can Parse JSON so maybe in some part of the benchmark this lib may be compared to the others

@xor-gate
Copy link
Contributor

That make sense, I was not aware of that.

@user1095108
Copy link

Please add js0n.

@tkokof
Copy link

tkokof commented Sep 6, 2018

Please add zzzJSON

@mloskot
Copy link

mloskot commented Sep 23, 2019

Related requests #113 (simdjson) and #118 (Boost/Beast JSON)

@pps83
Copy link

pps83 commented Jun 6, 2022

@miloyip, please add yyjson. This one seems to be the fastest json lib (faster than simdjson for large json files I process in my project)

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

10 participants