Here are the common methods to install ArduinoJson.

Method 1: Arduino IDE

Use this method if you use the Arduino IDE.

  1. Click on the library tab in the Arduino IDE
  2. Search for “ArduinoJson”
  3. Select the version: 7.0.4
  4. Click install.

Method 2: PlatformIO

Use this method if you use PlatfomIO.

  1. Click on the PlatformIO tab
  2. Click on “Libraries”
  3. Search for “ArduinoJson”
  4. Select the version: 7.0.4
  5. Click “Add to Project”

Method 3: CMake

Use this method if you use CMake.

See How to use ArduinoJson with CMake?

Method 4: Single header

Use this method if you use neither Arduino, PlatformIO, nor CMake.

  1. Download ArduinoJson-v7.0.4.h
  2. Save the file alongside with your .cpp files

Method 5: Build artifacts

Use this method to use the latest development version.

  1. Download the latest build artifacts
  2. Extract ArduinoJson.h to your project folder.

Method 6: Git clone

Use this method if you want to make changes to the library.

  1. Run the command git clone https://github.com/bblanchon/ArduinoJson.git
  2. Configure your compiler to add the folder ArduinoJson/src/ to the list of include folders (-I /path/to/ArduinoJson/src/ on GCC command line)