{"id":13417841,"url":"https://github.com/bblanchon/ArduinoJson","last_synced_at":"2025-03-15T02:31:48.380Z","repository":{"id":13120421,"uuid":"15802263","full_name":"bblanchon/ArduinoJson","owner":"bblanchon","description":"📟 JSON library for Arduino and embedded C++. Simple and efficient.","archived":false,"fork":false,"pushed_at":"2025-03-06T10:00:50.000Z","size":6413,"stargazers_count":6856,"open_issues_count":18,"forks_count":1134,"subscribers_count":199,"default_branch":"7.x","last_synced_at":"2025-03-11T18:24:18.063Z","etag":null,"topics":["arduino","arduino-library","c-plus-plus","embedded","esp32","esp8266","iot","json"],"latest_commit_sha":null,"homepage":"https://arduinojson.org","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bblanchon.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":"SUPPORT.md","governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"bblanchon","custom":["https://arduinojson.org/book/","https://donate.benoitblanchon.fr/"]}},"created_at":"2014-01-10T15:54:52.000Z","updated_at":"2025-03-11T12:07:26.000Z","dependencies_parsed_at":"2023-01-16T20:00:18.611Z","dependency_job_id":"dafbc92e-f941-46a2-baf9-176bdb0b1abd","html_url":"https://github.com/bblanchon/ArduinoJson","commit_stats":{"total_commits":1980,"total_committers":32,"mean_commits":61.875,"dds":0.5323232323232323,"last_synced_commit":"64cbaa6ff73053dd15d4db7cf5538fa6f921a9d2"},"previous_names":[],"tags_count":136,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bblanchon%2FArduinoJson","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bblanchon%2FArduinoJson/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bblanchon%2FArduinoJson/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bblanchon%2FArduinoJson/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bblanchon","download_url":"https://codeload.github.com/bblanchon/ArduinoJson/tar.gz/refs/heads/7.x","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243675000,"owners_count":20329187,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["arduino","arduino-library","c-plus-plus","embedded","esp32","esp8266","iot","json"],"created_at":"2024-07-30T22:00:53.739Z","updated_at":"2025-03-15T02:31:48.040Z","avatar_url":"https://github.com/bblanchon.png","language":"C++","readme":"\u003cp align=\"center\"\u003e\r\n  \u003ca href=\"https://arduinojson.org/\"\u003e\u003cimg alt=\"ArduinoJson\" src=\"https://arduinojson.org/images/logo.svg\" width=\"200\" /\u003e\u003c/a\u003e\r\n\u003c/p\u003e\r\n\r\n---\r\n\r\n[![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/bblanchon/ArduinoJson/ci.yml?branch=7.x\u0026logo=github)](https://github.com/bblanchon/ArduinoJson/actions?query=workflow%3A%22Continuous+Integration%22+branch%3A7.x)\r\n[![Continuous Integration](https://ci.appveyor.com/api/projects/status/m7s53wav1l0abssg/branch/7.x?svg=true)](https://ci.appveyor.com/project/bblanchon/arduinojson/branch/7.x)\r\n[![Fuzzing Status](https://oss-fuzz-build-logs.storage.googleapis.com/badges/arduinojson.svg)](https://bugs.chromium.org/p/oss-fuzz/issues/list?sort=-opened\u0026can=1\u0026q=proj:arduinojson)\r\n[![Coveralls branch](https://img.shields.io/coveralls/github/bblanchon/ArduinoJson/7.x?logo=coveralls)](https://coveralls.io/github/bblanchon/ArduinoJson?branch=7.x)  \r\n[![GitHub stars](https://img.shields.io/github/stars/bblanchon/ArduinoJson?style=flat\u0026logo=github\u0026color=orange)](https://github.com/bblanchon/ArduinoJson/stargazers)\r\n[![GitHub Sponsors](https://img.shields.io/github/sponsors/bblanchon?logo=github\u0026color=orange)](https://github.com/sponsors/bblanchon)\r\n\r\nArduinoJson is a C++ JSON library for Arduino and IoT (Internet Of Things).\r\n\r\n## Features\r\n\r\n* [JSON deserialization](https://arduinojson.org/v7/api/json/deserializejson/)\r\n    * [Optionally decodes UTF-16 escape sequences to UTF-8](https://arduinojson.org/v7/api/config/decode_unicode/)\r\n    * [Optionally supports comments in the input](https://arduinojson.org/v7/api/config/enable_comments/)\r\n    * [Optionally filters the input to keep only desired values](https://arduinojson.org/v7/api/json/deserializejson/#filtering)\r\n    * Supports single quotes as a string delimiter\r\n    * Compatible with [NDJSON](http://ndjson.org/) and [JSON Lines](https://jsonlines.org/)\r\n* [JSON serialization](https://arduinojson.org/v7/api/json/serializejson/)\r\n    * [Can write to a buffer or a stream](https://arduinojson.org/v7/api/json/serializejson/)\r\n    * [Optionally indents the document (prettified JSON)](https://arduinojson.org/v7/api/json/serializejsonpretty/)\r\n* [MessagePack serialization](https://arduinojson.org/v7/api/msgpack/serializemsgpack/)\r\n* [MessagePack deserialization](https://arduinojson.org/v7/api/msgpack/deserializemsgpack/)\r\n* Efficient\r\n    * [Twice smaller than the \"official\" Arduino_JSON library](https://arduinojson.org/2019/11/19/arduinojson-vs-arduino_json/)\r\n    * [Almost 10% faster than the \"official\" Arduino_JSON library](https://arduinojson.org/2019/11/19/arduinojson-vs-arduino_json/)\r\n    * [Consumes roughly 10% less RAM than the \"official\" Arduino_JSON library](https://arduinojson.org/2019/11/19/arduinojson-vs-arduino_json/)\r\n    * [Deduplicates strings](https://arduinojson.org/news/2020/08/01/version-6-16-0/)\r\n* Versatile\r\n    * Supports [custom allocators (to use external RAM chip, for example)](https://arduinojson.org/v7/how-to/use-external-ram-on-esp32/)\r\n    * Supports [`String`](https://arduinojson.org/v7/api/config/enable_arduino_string/), [`std::string`](https://arduinojson.org/v7/api/config/enable_std_string/), and [`std::string_view`](https://arduinojson.org/v7/api/config/enable_string_view/)\r\n    * Supports [`Stream`](https://arduinojson.org/v7/api/config/enable_arduino_stream/) and [`std::istream`/`std::ostream`](https://arduinojson.org/v7/api/config/enable_std_stream/)\r\n    * Supports [Flash strings](https://arduinojson.org/v7/api/config/enable_progmem/)\r\n    * Supports [custom readers](https://arduinojson.org/v7/api/json/deserializejson/#custom-reader) and [custom writers](https://arduinojson.org/v7/api/json/serializejson/#custom-writer)\r\n    * Supports [custom converters](https://arduinojson.org/news/2021/05/04/version-6-18-0/)\r\n* Portable\r\n    * Usable on any C++ project (not limited to Arduino)\r\n    * Compatible with C++11, C++14 and C++17\r\n    * Support for C++98/C++03 available on [ArduinoJson 6.20.x](https://github.com/bblanchon/ArduinoJson/tree/6.20.x)\r\n    * Zero warnings with `-Wall -Wextra -pedantic` and `/W4`\r\n    * [Header-only library](https://en.wikipedia.org/wiki/Header-only)\r\n    * Works with virtually any board\r\n        * Arduino boards: [Uno](https://amzn.to/38aL2ik), [Due](https://amzn.to/36YkWi2), [Micro](https://amzn.to/35WkdwG), [Nano](https://amzn.to/2QTvwRX), [Mega](https://amzn.to/36XWhuf), [Yun](https://amzn.to/30odURc), [Leonardo](https://amzn.to/36XWjlR)...\r\n        * Espressif chips: [ESP8266](https://amzn.to/36YluV8), [ESP32](https://amzn.to/2G4pRCB)\r\n        * Lolin (WeMos) boards: [D1 mini](https://amzn.to/2QUpz7q), [D1 Mini Pro](https://amzn.to/36UsGSs)...\r\n        * Teensy boards: [4.0](https://amzn.to/30ljXGq), [3.2](https://amzn.to/2FT0EuC), [2.0](https://amzn.to/2QXUMXj)\r\n        * Particle boards: [Argon](https://amzn.to/2FQHa9X), [Boron](https://amzn.to/36WgLUd), [Electron](https://amzn.to/30vEc4k), [Photon](https://amzn.to/387F9Cd)...\r\n        * Texas Instruments boards: [MSP430](https://amzn.to/30nJWgg)...\r\n        * Soft cores: [Nios II](https://en.wikipedia.org/wiki/Nios_II)...\r\n    * Tested on all major development environments\r\n        * [Arduino IDE](https://www.arduino.cc/en/Main/Software)\r\n        * [Atmel Studio](http://www.atmel.com/microsite/atmel-studio/)\r\n        * [Atollic TrueSTUDIO](https://atollic.com/truestudio/)\r\n        * [Energia](http://energia.nu/)\r\n        * [IAR Embedded Workbench](https://www.iar.com/iar-embedded-workbench/)\r\n        * [Keil uVision](http://www.keil.com/)\r\n        * [MPLAB X IDE](http://www.microchip.com/mplab/mplab-x-ide)\r\n        * [Particle](https://www.particle.io/)\r\n        * [PlatformIO](http://platformio.org/)\r\n        * [Sloeber plugin for Eclipse](https://eclipse.baeyens.it/)\r\n        * [Visual Micro](http://www.visualmicro.com/)\r\n        * [Visual Studio](https://www.visualstudio.com/)\r\n    * [Even works with online compilers like wandbox.org](https://wandbox.org/permlink/RlZSKy17DjJ6HcdN)\r\n    * [CMake friendly](https://arduinojson.org/v7/how-to/use-arduinojson-with-cmake/)\r\n* Well designed\r\n    * [Elegant API](http://arduinojson.org/v7/example/)\r\n    * [Thread-safe](https://en.wikipedia.org/wiki/Thread_safety)\r\n    * Self-contained (no external dependency)\r\n    * `const` friendly\r\n    * [`for` friendly](https://arduinojson.org/v7/api/jsonobject/begin_end/)\r\n    * [TMP friendly](https://en.wikipedia.org/wiki/Template_metaprogramming)\r\n    * Handles [integer overflows](https://arduinojson.org/v7/api/jsonvariant/as/#integer-overflows)\r\n* Well tested\r\n    * [Unit test coverage close to 100%](https://coveralls.io/github/bblanchon/ArduinoJson?branch=7.x)\r\n    * Continuously tested on\r\n        * [Visual Studio 2017, 2019, 2022](https://ci.appveyor.com/project/bblanchon/arduinojson/branch/7.x)\r\n        * [GCC 4.8, 5, 6, 7, 8, 9, 10, 11, 12](https://github.com/bblanchon/ArduinoJson/actions?query=workflow%3A%22Continuous+Integration%22)\r\n        * [Clang 3.9, 4.0, 5.0, 6.0, 7, 8, 9, 10, 11, 12, 13, 14, 15](https://github.com/bblanchon/ArduinoJson/actions?query=workflow%3A%22Continuous+Integration%22)\r\n    * [Continuously fuzzed with Google OSS Fuzz](https://bugs.chromium.org/p/oss-fuzz/issues/list?sort=-opened\u0026can=1\u0026q=proj:arduinojson)\r\n    * Passes all default checks of [clang-tidy](https://releases.llvm.org/10.0.0/tools/clang/tools/extra/docs/clang-tidy/)\r\n* Well documented\r\n    * [Tutorials](https://arduinojson.org/v7/doc/deserialization/)\r\n    * [Examples](https://arduinojson.org/v7/example/)\r\n    * [How-tos](https://arduinojson.org/v7/example/)\r\n    * [FAQ](https://arduinojson.org/v7/faq/)\r\n    * [Troubleshooter](https://arduinojson.org/v7/troubleshooter/)\r\n    * [Book](https://arduinojson.org/book/)\r\n    * [Changelog](CHANGELOG.md)\r\n* Vibrant user community\r\n    * Most popular of all Arduino libraries on [GitHub](https://github.com/search?o=desc\u0026q=arduino+library\u0026s=stars\u0026type=Repositories)\r\n    * [Used in hundreds of projects](https://www.hackster.io/search?i=projects\u0026q=arduinojson)\r\n    * [Responsive support](https://github.com/bblanchon/ArduinoJson/issues?q=is%3Aissue+is%3Aclosed)\r\n\r\n## Quickstart\r\n\r\n### Deserialization\r\n\r\nHere is a program that parses a JSON document with ArduinoJson.\r\n\r\n```c++\r\nconst char* json = \"{\\\"sensor\\\":\\\"gps\\\",\\\"time\\\":1351824120,\\\"data\\\":[48.756080,2.302038]}\";\r\n\r\nJsonDocument doc;\r\ndeserializeJson(doc, json);\r\n\r\nconst char* sensor = doc[\"sensor\"];\r\nlong time          = doc[\"time\"];\r\ndouble latitude    = doc[\"data\"][0];\r\ndouble longitude   = doc[\"data\"][1];\r\n```\r\n\r\nSee the [tutorial on arduinojson.org](https://arduinojson.org/v7/doc/deserialization/)\r\n\r\n### Serialization\r\n\r\nHere is a program that generates a JSON document with ArduinoJson:\r\n\r\n```c++\r\nJsonDocument doc;\r\n\r\ndoc[\"sensor\"] = \"gps\";\r\ndoc[\"time\"]   = 1351824120;\r\ndoc[\"data\"][0] = 48.756080;\r\ndoc[\"data\"][1] = 2.302038;\r\n\r\nserializeJson(doc, Serial);\r\n// This prints:\r\n// {\"sensor\":\"gps\",\"time\":1351824120,\"data\":[48.756080,2.302038]}\r\n```\r\n\r\nSee the [tutorial on arduinojson.org](https://arduinojson.org/v7/doc/serialization/)\r\n\r\n## Sponsors\r\n\r\nArduinoJson is thankful to its sponsors. Please give them a visit; they deserve it!\r\n\r\n\u003cp\u003e\r\n  \u003ca href=\"https://www.programmingelectronics.com/\" rel=\"sponsored\"\u003e\r\n    \u003cimg src=\"https://arduinojson.org/images/2021/10/programmingeleactronicsacademy.png\" alt=\"Programming Electronics Academy\" width=\"200\"\u003e\r\n  \u003c/a\u003e\r\n\u003c/p\u003e\r\n\u003cp\u003e\r\n  \u003ca href=\"https://github.com/1technophile\" rel=\"sponsored\"\u003e\r\n    \u003cimg alt=\"1technophile\" src=\"https://avatars.githubusercontent.com/u/12672732?s=40\u0026v=4\"\u003e\r\n  \u003c/a\u003e\r\n  \u003ca href=\"https://github.com/LArkema\" rel=\"sponsored\"\u003e\r\n    \u003cimg alt=\"LArkema\" src=\"https://avatars.githubusercontent.com/u/38381313?s=40\u0026v=4\"\u003e\r\n  \u003c/a\u003e\r\n\u003c/p\u003e\r\n\r\nIf you run a commercial project that embeds ArduinoJson, think about [sponsoring the library's development](https://github.com/sponsors/bblanchon): it ensures the code that your products rely on stays actively maintained. It can also give your project some exposure to the makers' community.\r\n\r\nIf you are an individual user and want to support the development (or give a sign of appreciation), consider purchasing the book [Mastering ArduinoJson](https://arduinojson.org/book/)\u0026nbsp;❤, or simply [cast a star](https://github.com/bblanchon/ArduinoJson/stargazers)\u0026nbsp;⭐.\r\n","funding_links":["https://github.com/sponsors/bblanchon","https://arduinojson.org/book/","https://donate.benoitblanchon.fr/"],"categories":["TODO scan for Android support in followings","C++","Libraries","Uncategorized","C/C++ 程序设计","JSON","Library","二、核心库（Library）"],"sub_categories":["Uncategorized","网络服务_其他","Arduino","2. Arduino生态常用库"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbblanchon%2FArduinoJson","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbblanchon%2FArduinoJson","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbblanchon%2FArduinoJson/lists"}