Arduino JSON library
====================
[![Build Status](https://travis-ci.org/bblanchon/ArduinoJson.svg?branch=master)](https://travis-ci.org/bblanchon/ArduinoJson) [![Coverage Status](https://img.shields.io/coveralls/bblanchon/ArduinoJson.svg)](https://coveralls.io/r/bblanchon/ArduinoJson?branch=master)
*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
--------
* JSON decoding
* JSON encoding (with optional indentation)
* Elegant API, very easy to use
* Fixed memory allocation (no malloc)
* Small footprint
* MIT License
Quick start
-----------
#### Decoding / Parsing
char json[] = "{\"sensor\":\"gps\",\"time\":1351824120,\"data\":[48.756080,2.302038]}";
StaticJsonBuffer<200> jsonBuffer;
JsonObject& root = jsonBuffer.parseObject(json);
const char* sensor = root["sensor"];
long time = root["time"];
double latitude = root["data"][0];
double longitude = root["data"][1];
#### Encoding / Generating
StaticJsonBuffer<200> jsonBuffer;
JsonObject& root = jsonBuffer.createObject();
root["sensor"] = "gps";
root["time"] = 1351824120;
JsonArray& data = root.createNestedArray("data");
data.add(48.756080, 6); // 6 is the number of decimals to print
data.add(2.302038, 6); // if not specified, 2 digits are printed
root.printTo(Serial);
// This prints:
// {"sensor":"gps","time":1351824120,"data":[48.756080,2.302038]}
Documentation
-------------
The documentation is available online in the [Arduino JSON wiki](https://github.com/bblanchon/ArduinoJson/wiki)
Testimonials
------------
From Arduino's Forum user `jflaplante`:
> I tried aJson 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.
From GitHub user `zacsketches`:
> Thanks for a great library!!!
> I've been watching you consistently develop this library over the past six months, and I used it today for a publish and subscribe architecture designed to help hobbyists move into more advanced robotics. Your library allowed me to implement remote subscription in order to facilitate multi-processor robots.
> ArduinoJson saved me a week's worth of time!!
---
Found this library useful? [Help me back with a donation!](https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=donate%40benoitblanchon%2efr&lc=GB&item_name=Benoit%20Blanchon&item_number=Arduino%20JSON¤cy_code=EUR&bn=PP%2dDonationsBF%3abtn_donate_LG%2egif%3aNonHosted) :smile:
没有合适的资源?快使用搜索试试~ 我知道了~
Arduino物联网库 ArduinoJson.h
共274个文件
cc:71个
cpp:47个
h:33个
需积分: 18 49 下载量 178 浏览量
2019-03-06
21:01:07
上传
评论 2
收藏 1.09MB RAR 举报
温馨提示
Arduino物联网依赖库,使用方法参见Arduino物联网三步曲—(2)OneNET远程数据监控
资源推荐
资源详情
资源评论
收起资源包目录
Arduino物联网库 ArduinoJson.h (274个子文件)
configure.ac 3KB
Makefile.am 10KB
gtest.cbproj 10KB
gtest_unittest.cbproj 8KB
gtest_main.cbproj 8KB
gtest-all.cc 346KB
gtest_unittest.cc 234KB
gtest.cc 180KB
gtest_pred_impl_unittest.cc 76KB
gtest-death-test.cc 50KB
gtest-printers_test.cc 48KB
gtest-death-test_test.cc 42KB
gtest-port_test.cc 38KB
gtest-param-test_test.cc 33KB
gtest_output_test_.cc 32KB
gtest-port.cc 27KB
gtest-filepath_test.cc 23KB
gtest-filepath.cc 14KB
gtest-unittest-api_test.cc 13KB
gtest-printers.cc 12KB
gtest-typed-test_test.cc 11KB
gtest-listener_test.cc 10KB
gtest_stress_test.cc 9KB
gtest-tuple_test.cc 9KB
sample6_unittest.cc 9KB
gtest_catch_exceptions_test_.cc 9KB
gtest_repeat_test.cc 8KB
gtest-options_test.cc 8KB
gtest-test-part_test.cc 7KB
sample8_unittest.cc 7KB
gtest_environment_test.cc 6KB
sample5_unittest.cc 6KB
gtest_xml_output_unittest_.cc 6KB
sample9_unittest.cc 6KB
sample3_unittest.cc 5KB
gtest-message_test.cc 5KB
sample1_unittest.cc 5KB
sample7_unittest.cc 5KB
sample10_unittest.cc 5KB
gtest_premature_exit_test.cc 5KB
gtest_list_tests_unittest_.cc 5KB
gtest-test-part.cc 4KB
gtest-linked_ptr_test.cc 4KB
sample2_unittest.cc 4KB
gtest-typed-test.cc 4KB
gtest-death-test_ex_test.cc 4KB
gtest_env_var_test_.cc 3KB
gtest_filter_unittest_.cc 3KB
gtest_throw_on_failure_ex_test.cc 3KB
gtest_shuffle_test_.cc 3KB
gtest_break_on_failure_unittest_.cc 3KB
gtest_throw_on_failure_test_.cc 3KB
gtest_color_test_.cc 3KB
gtest-param-test2_test.cc 3KB
widget_test.cc 3KB
sample1.cc 2KB
gtest_no_test_unittest.cc 2KB
widget.cc 2KB
sample2.cc 2KB
gtest_all_test.cc 2KB
gtest_sole_header_test.cc 2KB
gtest_prod_test.cc 2KB
gtest-all.cc 2KB
gtest_help_test_.cc 2KB
gtest-typed-test2_test.cc 2KB
gtest_xml_outfile2_test_.cc 2KB
gtest_xml_outfile1_test_.cc 2KB
gtest_link.cc 2KB
sample4.cc 2KB
gtest_uninitialized_test_.cc 2KB
sample4_unittest.cc 2KB
gtest_main_unittest.cc 2KB
gtest_all.cc 2KB
gtest_main.cc 2KB
gtest_main.cc 2KB
production.cc 2KB
CHANGES 6KB
internal_utils.cmake 9KB
configure 551KB
CONTRIBUTORS 1KB
IntegrationTests.cpp 5KB
GbathreeBug.cpp 5KB
JsonParser.cpp 4KB
JsonParser_Object_Tests.cpp 4KB
JsonParser_Array_Tests.cpp 3KB
QuotedString_ExtractFrom_Tests.cpp 3KB
JsonObject_Container_Tests.cpp 3KB
JsonArray_Container_Tests.cpp 3KB
JsonObject_PrintTo_Tests.cpp 3KB
JsonVariant.cpp 3KB
JsonArray_PrintTo_Tests.cpp 2KB
JsonVariant_Comparison_Tests.cpp 2KB
JsonParser_NestingLimit_Tests.cpp 2KB
JsonObject.cpp 2KB
QuotedString.cpp 2KB
JsonVariant_Invalid_Tests.cpp 2KB
JsonVariant_Subscript_Tests.cpp 2KB
Prettyfier.cpp 2KB
JsonVariant_Storage_Tests.cpp 2KB
DynamicJsonBuffer_Basic_Tests.cpp 2KB
共 274 条
- 1
- 2
- 3
资源评论
AI_RICO
- 粉丝: 108
- 资源: 5
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功