-
Notifications
You must be signed in to change notification settings - Fork 0
Using the library with Arduino
This library is primarily design to be used with the Arduino IDE and therefore has a simplified setup procedure for that environment. If you don't use the Arduino IDE, please read [Using the library without Arduino](Using the library without Arduino).
ArduinoJson is available in Arduino's Library Manager. You can automatically install it from there.
Note: if ArduinoJson doesn't appear in Library Manager, or if only old versions are listed, try to delete the local cache. For example, on Windows, you need to delete:
%LOCALAPPDATA%\Arduino15\library_index.json%LOCALAPPDATA%\Arduino15\library_index.json.tmp.gz
You don't even need to close Arduino, just re-open the library manager.
You needed to download the zip package and extract it to:
<your Arduino Sketch folder>/libraries/ArduinoJson
Then restart the Arduino IDE.
NOTE: There are two packages the standard and the "old-layout". You need to use the "old-layout" for Arduino 1.0.X, Energia and other alternative IDE.
You need the latest version (January 2016 or later) of Visual Micro installed for Visual Studio or Atmel Studio.
Click File / Example / ArduinoJson.
Just add the following line at the top of your program:
#include <ArduinoJson.h>
Then follow the instructions:
- [Decoding JSON](Decoding JSON)
- [Encoding JSON](Encoding JSON)
