Fără Descriere

Benoit Blanchon a0a82c0f4e Renamed file 11 ani în urmă
JsonParser b2e2556ef6 Removed Visual Studio project files 11 ani în urmă
JsonParserTests b2e2556ef6 Removed Visual Studio project files 11 ani în urmă
examples 2997a405a0 Added IndentedPrint example 11 ani în urmă
include 58f155e135 Moved .h files to include/ 11 ani în urmă
scripts fed79bfd81 Updated the script to work on Windows too 11 ani în urmă
src 58d2c4a62f Renamed srcs/ into src/ 11 ani în urmă
test a0a82c0f4e Renamed file 11 ani în urmă
third-party 60a5d72367 Started a new solution from scratch. 11 ani în urmă
.gitignore 24b46af48a Moved build output to bin/ and lib/ 11 ani în urmă
CHANGELOG.md feb6060887 Updated change-log 11 ani în urmă
CMakeLists.txt 24b46af48a Moved build output to bin/ and lib/ 11 ani în urmă
JsonGenerator.cpp f77a8b02e3 Fixed file names 11 ani în urmă
JsonGenerator.h 6e4eb45210 Renamed JsonHashTable into JsonObject 11 ani în urmă
JsonParser.cpp b75d32e980 Renamed JsonHashTable into JsonObject 11 ani în urmă
JsonParser.h 3d8b31b1ec Moved all JsonParser code in a sub-folder. 11 ani în urmă
LICENSE.md 7a3fa35bd8 Added LICENSE.md 11 ani în urmă
README.md 49d2b4b2a2 Updated code size 11 ani în urmă
keywords.txt 6e4eb45210 Renamed JsonHashTable into JsonObject 11 ani în urmă

README.md

Arduino JSON library

An elegant and efficient JSON library for embedded systems.

It's design to have the most intuitive API, the smallest footprint and works without any allocation on the heap (no malloc).

It has been written with Arduino in mind, but it isn't linked to Arduino libraries so you can use this library in any other C++ project.

Features

Feature comparison

Library Memory allocation Nested objects Parser size Encoder size
Arduino JSON static yes 2760 Bytes 862 bytes
json-arduino dynamic no 3348 (+21%) not supported
aJson dynamic yes 5088 (+84%) 4678 (+540%)

"Parser size" was measured with a program parsing {"sensor":"outdoor","value":25.6}. For each library, I wrote a program that extracts a string and a float. I subtracted the size of a program doing the same without any JSON parsing involved. Source files are here.

"Encoder size" was measured with a program generating {"sensor":"outdoor","value":25.6}. Source files are here.

In each case the target platform was an Arduino Duemilanove and Arduino IDE 1.0.5 was used.

Links: json-arduino, aJson

Testimonials

From Arduino's Forum user jflaplante:

I tried the [aJson and json-arduino] before trying your library. I always ran into memory problem after a while. I have no such problem so far with your library. It is working perfectly with my web services.

From Arduino's Forum user gbathree:

Thanks so much - this is an awesome library! If you want to see what we're doing with it - the project is located at www.photosynq.org.

From StackOverflow user thegreendroid:

It has a really elegant, simple API and it works like a charm on embedded and Windows/Linux platforms. We recently started using this on an embedded project and I can vouch for its quality.

Related blog posts