mirror of
https://github.com/eledio-devices/thirdparty-ArduinoJson.git
synced 2025-11-01 00:38:27 +01:00
Added JsonError
This commit is contained in:
@@ -7,33 +7,36 @@
|
||||
#include "Deserialization/JsonParser.hpp"
|
||||
|
||||
namespace ArduinoJson {
|
||||
// bool deserializeJson(TDestination& destination, TString json);
|
||||
// JsonError deserializeJson(TDestination& destination, TString json);
|
||||
// TDestination = JsonArray, JsonObject, JsonVariant
|
||||
// TString = const std::string&, const String&
|
||||
template <typename TDestination, typename TString>
|
||||
typename Internals::EnableIf<!Internals::IsArray<TString>::value, bool>::type
|
||||
typename Internals::EnableIf<!Internals::IsArray<TString>::value,
|
||||
JsonError>::type
|
||||
deserializeJson(TDestination &destination, const TString &json,
|
||||
uint8_t nestingLimit = ARDUINOJSON_DEFAULT_NESTING_LIMIT) {
|
||||
return Internals::makeParser(&destination.buffer(), json, nestingLimit)
|
||||
.parse(destination);
|
||||
}
|
||||
//
|
||||
// bool deserializeJson(TDestination& destination, TString json);
|
||||
// JsonError deserializeJson(TDestination& destination, TString json);
|
||||
// TDestination = JsonArray, JsonObject, JsonVariant
|
||||
// TString = const char*, const char[N], const FlashStringHelper*
|
||||
template <typename TDestination, typename TString>
|
||||
bool deserializeJson(TDestination &destination, TString *json,
|
||||
uint8_t nestingLimit = ARDUINOJSON_DEFAULT_NESTING_LIMIT) {
|
||||
JsonError deserializeJson(
|
||||
TDestination &destination, TString *json,
|
||||
uint8_t nestingLimit = ARDUINOJSON_DEFAULT_NESTING_LIMIT) {
|
||||
return Internals::makeParser(&destination.buffer(), json, nestingLimit)
|
||||
.parse(destination);
|
||||
}
|
||||
//
|
||||
// bool deserializeJson(TDestination& destination, TString json);
|
||||
// JsonError deserializeJson(TDestination& destination, TString json);
|
||||
// TDestination = JsonArray, JsonObject, JsonVariant
|
||||
// TString = std::istream&, Stream&
|
||||
template <typename TDestination, typename TString>
|
||||
bool deserializeJson(TDestination &destination, TString &json,
|
||||
uint8_t nestingLimit = ARDUINOJSON_DEFAULT_NESTING_LIMIT) {
|
||||
JsonError deserializeJson(
|
||||
TDestination &destination, TString &json,
|
||||
uint8_t nestingLimit = ARDUINOJSON_DEFAULT_NESTING_LIMIT) {
|
||||
return Internals::makeParser(&destination.buffer(), json, nestingLimit)
|
||||
.parse(destination);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user