mirror of
https://github.com/bblanchon/ArduinoJson.git
synced 2025-08-01 19:54:45 +02:00
Updated API Reference (markdown)
@@ -2,6 +2,50 @@ This is the detailed documentation of every class and function of the ArduinoJso
|
||||
Some parts have been simplified to be easier to understand, so if you look at the source code, you might see some differences.
|
||||
|
||||
|
||||
<!-- MarkdownTOC depth=3 autolink=true bracket=round lowercase_only_ascii=true -->
|
||||
|
||||
- [JsonArray](#jsonarray)
|
||||
- [Constructor](#constructor)
|
||||
- [JsonArray::add\(\)](#jsonarrayadd)
|
||||
- [JsonArray::createNestedArray\(\)](#jsonarraycreatenestedarray)
|
||||
- [JsonArray::createNestedObject\(\)](#jsonarraycreatenestedobject)
|
||||
- [JsonArray::get\(\)](#jsonarrayget)
|
||||
- [JsonArray::measureLength\(\)](#jsonarraymeasurelength)
|
||||
- [JsonArray::measurePrettyLength\(\)](#jsonarraymeasureprettylength)
|
||||
- [JsonArray::operator\[\]](#jsonarrayoperator)
|
||||
- [JsonArray::prettyPrintTo\(\)](#jsonarrayprettyprintto)
|
||||
- [JsonArray::printTo\(\)](#jsonarrayprintto)
|
||||
- [JsonArray::removeAt\(\)](#jsonarrayremoveat)
|
||||
- [JsonArray::set\(\)](#jsonarrayset)
|
||||
- [JsonArray::size\(\)](#jsonarraysize)
|
||||
- [JsonArray::success\(\)](#jsonarraysuccess)
|
||||
- [JsonBuffer \(DynamicJsonBuffer and StaticJsonBuffer\)](#jsonbuffer-dynamicjsonbuffer-and-staticjsonbuffer)
|
||||
- [JsonBuffer::createArray\(\)](#jsonbuffercreatearray)
|
||||
- [JsonBuffer::createObject\(\)](#jsonbuffercreateobject)
|
||||
- [JsonBuffer::parseArray\(\)](#jsonbufferparsearray)
|
||||
- [JsonBuffer::parseObject\(\)](#jsonbufferparseobject)
|
||||
- [JsonBuffer::strdup\(\)](#jsonbufferstrdup)
|
||||
- [JsonObject](#jsonobject)
|
||||
- [Constructor](#constructor-1)
|
||||
- [JsonObject::begin\(\) / JsonObject::end\(\)](#jsonobjectbegin--jsonobjectend)
|
||||
- [JsonObject::createNestedArray\(\)](#jsonobjectcreatenestedarray)
|
||||
- [JsonObject::createNestedObject\(\)](#jsonobjectcreatenestedobject)
|
||||
- [JsonObject::get\(\)](#jsonobjectget)
|
||||
- [JsonObject::measureLength\(\)](#jsonobjectmeasurelength)
|
||||
- [JsonObject::measurePrettyLength\(\)](#jsonobjectmeasureprettylength)
|
||||
- [JsonObject::operator\[\]](#jsonobjectoperator)
|
||||
- [JsonObject::prettyPrintTo\(\)](#jsonobjectprettyprintto)
|
||||
- [JsonObject::printTo\(\)](#jsonobjectprintto)
|
||||
- [JsonObject::remove\(\)](#jsonobjectremove)
|
||||
- [JsonObject::set\(\)](#jsonobjectset)
|
||||
- [JsonObject::size\(\)](#jsonobjectsize)
|
||||
- [JsonObject::success\(\)](#jsonobjectsuccess)
|
||||
- [JsonVariant](#jsonvariant)
|
||||
- [JsonVariant::as\(\)](#jsonvariantas)
|
||||
- [JsonVariant::is\(\)](#jsonvariantis)
|
||||
|
||||
<!-- /MarkdownTOC -->
|
||||
|
||||
|
||||
## JsonArray
|
||||
|
||||
@@ -310,7 +354,7 @@ Can be either:
|
||||
|
||||
* a `buffer` with specified `size` (this includes the zero-terminator)
|
||||
* an implementation of `Print` (like `Serial`, `EthernetClient`...)
|
||||
* a `String`
|
||||
* a `String`
|
||||
|
||||
##### Return value
|
||||
|
||||
@@ -361,7 +405,7 @@ Can be either:
|
||||
|
||||
* a `buffer` with specified `size` (this includes the zero-terminator)
|
||||
* an implementation of `Print` (like `Serial`, `EthernetClient`...)
|
||||
* a `String`
|
||||
* a `String`
|
||||
|
||||
##### Return value
|
||||
|
||||
@@ -562,7 +606,7 @@ Serial.println(array.success()); // false
|
||||
|
||||
|
||||
|
||||
## JsonBuffer (DynamicJsonBuffer and StaticJsonBuffer)
|
||||
## JsonBuffer (DynamicJsonBuffer and StaticJsonBuffer)
|
||||
|
||||
`JsonBuffer` is the entry point for using the library: it handle the memory management and calls the parser.
|
||||
|
||||
@@ -626,7 +670,7 @@ Therefore, it's recommended to have a JSON input in a `char[]` or a `char*`.
|
||||
|
||||
##### Signatures
|
||||
```c++
|
||||
JsonArray& parseArray(char* json, uint8_t nestingLimit=10); // <- recommended
|
||||
JsonArray& parseArray(char* json, uint8_t nestingLimit=10); // <- recommended
|
||||
JsonArray& parseArray(const char* json, uint8_t nestingLimit=10);
|
||||
JsonArray& parseArray(const String& json, uint8_t nestingLimit=10);
|
||||
```
|
||||
@@ -667,7 +711,7 @@ Therefore, it's recommended to have a JSON input in a `char[]` or a `char*`.
|
||||
|
||||
##### Signatures
|
||||
```c++
|
||||
JsonObject& parseObject(char* json, uint8_t nestingLimit=10); // <- recommended
|
||||
JsonObject& parseObject(char* json, uint8_t nestingLimit=10); // <- recommended
|
||||
JsonObject& parseObject(const char* json, uint8_t nestingLimit=10);
|
||||
JsonObject& parseObject(const String& json, uint8_t nestingLimit=10);
|
||||
```
|
||||
@@ -1048,7 +1092,7 @@ Can be either:
|
||||
|
||||
* a `buffer` with specified `size` (this includes the zero-terminator)
|
||||
* an implementation of `Print` (like `Serial`, `EthernetClient`...)
|
||||
* a `String`
|
||||
* a `String`
|
||||
|
||||
##### Return value
|
||||
|
||||
@@ -1097,7 +1141,7 @@ Can be either:
|
||||
|
||||
* a `buffer` with specified `size` (this includes the zero-terminator)
|
||||
* an implementation of `Print` (like `Serial`, `EthernetClient`...)
|
||||
* a `String`
|
||||
* a `String`
|
||||
|
||||
##### Return value
|
||||
|
||||
@@ -1439,4 +1483,4 @@ JsonVariant variant = 42;
|
||||
bool i = variant.is<int>(); // <- i == true
|
||||
bool d = variant.is<double>(); // <- d == false
|
||||
bool s = variant.is<char*>(); // <- s == false
|
||||
```
|
||||
```
|
||||
|
Reference in New Issue
Block a user