Go Down

Topic: Zero-efforts JSONing for Arduino (Read 765 times) previous topic - next topic

hutorny

Dear Community,

Please let me announce availability of a zero-efforts, zero-allocation, zero-dependency, small footprint,  cross-platform library for reading/writing JSON data: COJSON

  • It is truly zero-efforts - just paste JSON you need to parse/write in the codegen page, set options "Use AVR progmem" and copy C++ code to your project.
  • Zero-allocation - the library does not allocate memory and uses stack in a conservative manner
  • Zero-dependency - it needs only GCC 4.9 or higher
  • Small footprint - it need 4K ROM and 100 bytes RAM for a simple object and 16K / 400 bytes for a more complex one
  • Cross-platform - it compiles and runs on any platform supported by GCC 4.9 or higher - AVR, ARM Cortex-M0, MIPS, MIPSel, x86, x64

COJSON library for Arduino is available on this link cojson.zip.
Sources are hosted on github hutorny/cojson
For more information, please visit home page

pert

Your definition of "zero-efforts" is vastly different from mine and the majority of other Arduino users. I'm sure it's a great project but I think you really miss the mark for this user base. In the Arduino world, "library" means I either install via the Arduino IDE's Library Manager or else download a .zip file of the repo and then install that file via the Arduino IDE.

hutorny

Your definition of "zero-efforts" is vastly different from mine and the majority of other Arduino users. I'm sure it's a great project but I think you really miss the mark for this user base. In the Arduino world, "library" means I either install via the Arduino IDE's Library Manager or else download a .zip file of the repo and then install that file via the Arduino IDE.
The initial post contains a link to a zip file which you can install with Arduino IDE's Library Manager.

pert

Oops, I didn't check that. I went straight to the repository and the website. It might be worth adding that link somewhere in the documentation. I see it now on your Downloads page but it doesn't seem to be mentioned anywhere else.

BTW, the .zip file can't be installed via Library Manager, but it can be installed via Sketch > Include Library > Add .ZIP Library.... Library Manager makes installation and updates especially of libraries even easier but you need to have an Arduino IDE compatible library in a repository, then simply submit a request for it to be added to the index. Details here:
https://github.com/arduino/Arduino/wiki/Library-Manager-FAQ

There is a minor problem with the formatting of your keywords.txt file. The field separators must be a single true tab, not multiple tabs or spaces. If you have that file on GitHub anywhere, I'm happy to submit a pull request. Otherwise, you can just refer to the relevant section of the Arduino library specification:
https://github.com/arduino/Arduino/wiki/Arduino-IDE-1.5:-Library-specification#keywordstxt-format

hutorny

Oops, I didn't check that. I went straight to the repository and the website. It might be worth adding that link somewhere in the documentation. I see it now on your Downloads page but it doesn't seem to be mentioned anywhere else.
Thank you for your feedback. I'll definitely make a more prominent message about Arduino library in my blog.

BTW, the .zip file can't be installed via Library Manager, but it can be installed via Sketch > Include Library > Add .ZIP Library.... Library Manager makes installation and updates especially of libraries even easier but you need to have an Arduino IDE compatible library in a repository, then simply submit a request for it to be added to the index. Details here:
https://github.com/arduino/Arduino/wiki/Library-Manager-FAQ
Thanks for these materials, that's what I failed to find in the first place.

There is a minor problem with the formatting of your keywords.txt file. The field separators must be a single true tab, not multiple tabs or spaces.
I didn't know that. Thanks for sharing this knowledge.

If you have that file on GitHub anywhere, I'm happy to submit a pull request. Otherwise, you can just refer to the relevant section of the Arduino library specification:
https://github.com/arduino/Arduino/wiki/Arduino-IDE-1.5:-Library-specification#keywordstxt-format
I'll look there.

hutorny

Library Manager makes installation and updates especially of libraries even easier but you need to have an Arduino IDE compatible library in a repository, then simply submit a request for it to be added to the index.
All issues you pointed out are addressed in version 2.2.0.
A request for adding to Library Manager has been submitted: https://github.com/arduino/Arduino/issues/8118

Go Up