mirror of
https://github.com/bblanchon/ArduinoJson.git
synced 2025-06-29 03:11:00 +02:00
Compare commits
8 Commits
replace-ex
...
v5.13.5
Author | SHA1 | Date | |
---|---|---|---|
ad4b13c8f0 | |||
f20f8e3171 | |||
5c297ba4a2 | |||
f483b06735 | |||
a0011ba7f8 | |||
ae2bfee0b1 | |||
b171872b58 | |||
0d01e84336 |
@ -1,5 +1,5 @@
|
|||||||
// ArduinoJson - arduinojson.org
|
// ArduinoJson - arduinojson.org
|
||||||
// Copyright Benoit Blanchon 2014-2018
|
// Copyright Benoit Blanchon 2014-2019
|
||||||
// MIT License
|
// MIT License
|
||||||
|
|
||||||
#include "src/ArduinoJson.h"
|
#include "src/ArduinoJson.h"
|
||||||
|
@ -1,6 +1,13 @@
|
|||||||
ArduinoJson: change log
|
ArduinoJson: change log
|
||||||
=======================
|
=======================
|
||||||
|
|
||||||
|
v5.13.5
|
||||||
|
-------
|
||||||
|
|
||||||
|
* Fixed warning "unused variable" with GCC 4.4 (issue #912)
|
||||||
|
* Fixed warning "maybe uninitialized" (issue #909)
|
||||||
|
* Added an clear message for `StaticJsonDocument`, `DynamicJsonDocument`...
|
||||||
|
|
||||||
v5.13.4
|
v5.13.4
|
||||||
-------
|
-------
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
# ArduinoJson - arduinojson.org
|
# ArduinoJson - arduinojson.org
|
||||||
# Copyright Benoit Blanchon 2014-2018
|
# Copyright Benoit Blanchon 2014-2019
|
||||||
# MIT License
|
# MIT License
|
||||||
|
|
||||||
cmake_minimum_required(VERSION 3.0)
|
cmake_minimum_required(VERSION 3.0)
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
The MIT License (MIT)
|
The MIT License (MIT)
|
||||||
---------------------
|
---------------------
|
||||||
|
|
||||||
Copyright © 2014-2018 Benoit BLANCHON
|
Copyright © 2014-2019 Benoit BLANCHON
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
[](https://www.ardu-badge.com/ArduinoJson/5.13.4)
|
[](https://www.ardu-badge.com/ArduinoJson/5.13.5)
|
||||||
[](https://ci.appveyor.com/project/bblanchon/arduinojson/branch/master)
|
[](https://ci.appveyor.com/project/bblanchon/arduinojson/branch/master)
|
||||||
[](https://travis-ci.org/bblanchon/ArduinoJson)
|
[](https://travis-ci.org/bblanchon/ArduinoJson)
|
||||||
[](https://coveralls.io/r/bblanchon/ArduinoJson?branch=master)
|
[](https://coveralls.io/r/bblanchon/ArduinoJson?branch=master)
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
version: 5.13.4.{build}
|
version: 5.13.5.{build}
|
||||||
environment:
|
environment:
|
||||||
matrix:
|
matrix:
|
||||||
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
|
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// ArduinoJson - arduinojson.org
|
// ArduinoJson - arduinojson.org
|
||||||
// Copyright Benoit Blanchon 2014-2018
|
// Copyright Benoit Blanchon 2014-2019
|
||||||
// MIT License
|
// MIT License
|
||||||
//
|
//
|
||||||
// This example shows how to store your project configuration in a file.
|
// This example shows how to store your project configuration in a file.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// ArduinoJson - arduinojson.org
|
// ArduinoJson - arduinojson.org
|
||||||
// Copyright Benoit Blanchon 2014-2018
|
// Copyright Benoit Blanchon 2014-2019
|
||||||
// MIT License
|
// MIT License
|
||||||
//
|
//
|
||||||
// This example shows how to generate a JSON document with ArduinoJson.
|
// This example shows how to generate a JSON document with ArduinoJson.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// ArduinoJson - arduinojson.org
|
// ArduinoJson - arduinojson.org
|
||||||
// Copyright Benoit Blanchon 2014-2018
|
// Copyright Benoit Blanchon 2014-2019
|
||||||
// MIT License
|
// MIT License
|
||||||
//
|
//
|
||||||
// This example shows how to parse a JSON document in an HTTP response.
|
// This example shows how to parse a JSON document in an HTTP response.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// ArduinoJson - arduinojson.org
|
// ArduinoJson - arduinojson.org
|
||||||
// Copyright Benoit Blanchon 2014-2018
|
// Copyright Benoit Blanchon 2014-2019
|
||||||
// MIT License
|
// MIT License
|
||||||
//
|
//
|
||||||
// This example shows how to deserialize a JSON document with ArduinoJson.
|
// This example shows how to deserialize a JSON document with ArduinoJson.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// ArduinoJson - arduinojson.org
|
// ArduinoJson - arduinojson.org
|
||||||
// Copyright Benoit Blanchon 2014-2018
|
// Copyright Benoit Blanchon 2014-2019
|
||||||
// MIT License
|
// MIT License
|
||||||
//
|
//
|
||||||
// This example shows how to implement an HTTP server that sends JSON document
|
// This example shows how to implement an HTTP server that sends JSON document
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// ArduinoJson - arduinojson.org
|
// ArduinoJson - arduinojson.org
|
||||||
// Copyright Benoit Blanchon 2014-2018
|
// Copyright Benoit Blanchon 2014-2019
|
||||||
// MIT License
|
// MIT License
|
||||||
//
|
//
|
||||||
// This example shows how to send a JSON document to a UDP socket.
|
// This example shows how to send a JSON document to a UDP socket.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// ArduinoJson - arduinojson.org
|
// ArduinoJson - arduinojson.org
|
||||||
// Copyright Benoit Blanchon 2014-2018
|
// Copyright Benoit Blanchon 2014-2019
|
||||||
// MIT License
|
// MIT License
|
||||||
//
|
//
|
||||||
// This example shows the different ways you can use Flash strings with
|
// This example shows the different ways you can use Flash strings with
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// ArduinoJson - arduinojson.org
|
// ArduinoJson - arduinojson.org
|
||||||
// Copyright Benoit Blanchon 2014-2018
|
// Copyright Benoit Blanchon 2014-2019
|
||||||
// MIT License
|
// MIT License
|
||||||
//
|
//
|
||||||
// This example shows the different ways you can use String with ArduinoJson.
|
// This example shows the different ways you can use String with ArduinoJson.
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/bblanchon/ArduinoJson.git"
|
"url": "https://github.com/bblanchon/ArduinoJson.git"
|
||||||
},
|
},
|
||||||
"version": "5.13.4",
|
"version": "5.13.5",
|
||||||
"authors": {
|
"authors": {
|
||||||
"name": "Benoit Blanchon",
|
"name": "Benoit Blanchon",
|
||||||
"url": "https://blog.benoitblanchon.fr"
|
"url": "https://blog.benoitblanchon.fr"
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
name=ArduinoJson
|
name=ArduinoJson
|
||||||
version=5.13.4
|
version=5.13.5
|
||||||
author=Benoit Blanchon <blog.benoitblanchon.fr>
|
author=Benoit Blanchon <blog.benoitblanchon.fr>
|
||||||
maintainer=Benoit Blanchon <blog.benoitblanchon.fr>
|
maintainer=Benoit Blanchon <blog.benoitblanchon.fr>
|
||||||
sentence=An efficient and elegant JSON library for Arduino.
|
sentence=An efficient and elegant JSON library for Arduino.
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
#!/bin/sh -ex
|
#!/bin/sh -ex
|
||||||
|
|
||||||
if [ $(uname) = 'Darwin' ]; then
|
if [ "$(uname)" = 'Darwin' ]; then
|
||||||
URL=https://cmake.org/files/v3.4/cmake-3.4.3-Darwin-x86_64.tar.gz
|
URL=https://cmake.org/files/v3.4/cmake-3.4.3-Darwin-x86_64.tar.gz
|
||||||
CMAKE=/tmp/CMake.app/Contents/bin/cmake
|
CMAKE=/tmp/CMake.app/Contents/bin/cmake
|
||||||
CTEST=/tmp/CMake.app/Contents/bin/ctest
|
CTEST=/tmp/CMake.app/Contents/bin/ctest
|
||||||
@ -23,8 +23,11 @@ fi
|
|||||||
|
|
||||||
if [ -n "$SANITIZE" ]; then
|
if [ -n "$SANITIZE" ]; then
|
||||||
export CXXFLAGS="-fsanitize=$SANITIZE"
|
export CXXFLAGS="-fsanitize=$SANITIZE"
|
||||||
|
BUILD_TYPE="Debug"
|
||||||
|
else
|
||||||
|
BUILD_TYPE="Release"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
$CMAKE .
|
$CMAKE -DCMAKE_BUILD_TYPE=$BUILD_TYPE .
|
||||||
$CMAKE --build .
|
$CMAKE --build .
|
||||||
$CTEST --output-on-failure .
|
$CTEST --output-on-failure .
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// ArduinoJson - arduinojson.org
|
// ArduinoJson - arduinojson.org
|
||||||
// Copyright Benoit Blanchon 2014-2018
|
// Copyright Benoit Blanchon 2014-2019
|
||||||
// MIT License
|
// MIT License
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// ArduinoJson - arduinojson.org
|
// ArduinoJson - arduinojson.org
|
||||||
// Copyright Benoit Blanchon 2014-2018
|
// Copyright Benoit Blanchon 2014-2019
|
||||||
// MIT License
|
// MIT License
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
@ -17,3 +17,5 @@
|
|||||||
#include "ArduinoJson/JsonObjectImpl.hpp"
|
#include "ArduinoJson/JsonObjectImpl.hpp"
|
||||||
#include "ArduinoJson/JsonVariantImpl.hpp"
|
#include "ArduinoJson/JsonVariantImpl.hpp"
|
||||||
#include "ArduinoJson/Serialization/JsonSerializerImpl.hpp"
|
#include "ArduinoJson/Serialization/JsonSerializerImpl.hpp"
|
||||||
|
|
||||||
|
#include "ArduinoJson/compatibility.hpp"
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// ArduinoJson - arduinojson.org
|
// ArduinoJson - arduinojson.org
|
||||||
// Copyright Benoit Blanchon 2014-2018
|
// Copyright Benoit Blanchon 2014-2019
|
||||||
// MIT License
|
// MIT License
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// ArduinoJson - arduinojson.org
|
// ArduinoJson - arduinojson.org
|
||||||
// Copyright Benoit Blanchon 2014-2018
|
// Copyright Benoit Blanchon 2014-2019
|
||||||
// MIT License
|
// MIT License
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
@ -33,5 +33,5 @@ class Encoding {
|
|||||||
return &"\"\"\\\\b\bf\fn\nr\rt\t"[excludeIdenticals ? 4 : 0];
|
return &"\"\"\\\\b\bf\fn\nr\rt\t"[excludeIdenticals ? 4 : 0];
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
} // namespace Internals
|
||||||
}
|
} // namespace ArduinoJson
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// ArduinoJson - arduinojson.org
|
// ArduinoJson - arduinojson.org
|
||||||
// Copyright Benoit Blanchon 2014-2018
|
// Copyright Benoit Blanchon 2014-2019
|
||||||
// MIT License
|
// MIT License
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
@ -18,5 +18,5 @@ class JsonBufferAllocated {
|
|||||||
|
|
||||||
void operator delete(void *, JsonBuffer *)throw();
|
void operator delete(void *, JsonBuffer *)throw();
|
||||||
};
|
};
|
||||||
}
|
} // namespace Internals
|
||||||
}
|
} // namespace ArduinoJson
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// ArduinoJson - arduinojson.org
|
// ArduinoJson - arduinojson.org
|
||||||
// Copyright Benoit Blanchon 2014-2018
|
// Copyright Benoit Blanchon 2014-2019
|
||||||
// MIT License
|
// MIT License
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
@ -14,5 +14,5 @@ typedef double JsonFloat;
|
|||||||
#else
|
#else
|
||||||
typedef float JsonFloat;
|
typedef float JsonFloat;
|
||||||
#endif
|
#endif
|
||||||
}
|
} // namespace Internals
|
||||||
}
|
} // namespace ArduinoJson
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// ArduinoJson - arduinojson.org
|
// ArduinoJson - arduinojson.org
|
||||||
// Copyright Benoit Blanchon 2014-2018
|
// Copyright Benoit Blanchon 2014-2019
|
||||||
// MIT License
|
// MIT License
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
@ -19,5 +19,5 @@ typedef unsigned _int64 JsonUInt;
|
|||||||
typedef long JsonInteger;
|
typedef long JsonInteger;
|
||||||
typedef unsigned long JsonUInt;
|
typedef unsigned long JsonUInt;
|
||||||
#endif
|
#endif
|
||||||
}
|
} // namespace Internals
|
||||||
}
|
} // namespace ArduinoJson
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// ArduinoJson - arduinojson.org
|
// ArduinoJson - arduinojson.org
|
||||||
// Copyright Benoit Blanchon 2014-2018
|
// Copyright Benoit Blanchon 2014-2019
|
||||||
// MIT License
|
// MIT License
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
@ -38,5 +38,5 @@ template <>
|
|||||||
struct JsonVariantAs<const JsonObject> {
|
struct JsonVariantAs<const JsonObject> {
|
||||||
typedef const JsonObject& type;
|
typedef const JsonObject& type;
|
||||||
};
|
};
|
||||||
}
|
} // namespace Internals
|
||||||
}
|
} // namespace ArduinoJson
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// ArduinoJson - arduinojson.org
|
// ArduinoJson - arduinojson.org
|
||||||
// Copyright Benoit Blanchon 2014-2018
|
// Copyright Benoit Blanchon 2014-2019
|
||||||
// MIT License
|
// MIT License
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
@ -23,5 +23,5 @@ union JsonVariantContent {
|
|||||||
JsonArray* asArray; // asArray cannot be null
|
JsonArray* asArray; // asArray cannot be null
|
||||||
JsonObject* asObject; // asObject cannot be null
|
JsonObject* asObject; // asObject cannot be null
|
||||||
};
|
};
|
||||||
}
|
} // namespace Internals
|
||||||
}
|
} // namespace ArduinoJson
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// ArduinoJson - arduinojson.org
|
// ArduinoJson - arduinojson.org
|
||||||
// Copyright Benoit Blanchon 2014-2018
|
// Copyright Benoit Blanchon 2014-2019
|
||||||
// MIT License
|
// MIT License
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
@ -19,5 +19,5 @@ struct JsonVariantDefault<const T> : JsonVariantDefault<T> {};
|
|||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
struct JsonVariantDefault<T&> : JsonVariantDefault<T> {};
|
struct JsonVariantDefault<T&> : JsonVariantDefault<T> {};
|
||||||
}
|
} // namespace Internals
|
||||||
}
|
} // namespace ArduinoJson
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// ArduinoJson - arduinojson.org
|
// ArduinoJson - arduinojson.org
|
||||||
// Copyright Benoit Blanchon 2014-2018
|
// Copyright Benoit Blanchon 2014-2019
|
||||||
// MIT License
|
// MIT License
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
@ -23,5 +23,5 @@ enum JsonVariantType {
|
|||||||
JSON_OBJECT, // JsonVariant stores a pointer to a JsonObject
|
JSON_OBJECT, // JsonVariant stores a pointer to a JsonObject
|
||||||
JSON_FLOAT // JsonVariant stores a JsonFloat
|
JSON_FLOAT // JsonVariant stores a JsonFloat
|
||||||
};
|
};
|
||||||
}
|
} // namespace Internals
|
||||||
}
|
} // namespace ArduinoJson
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// ArduinoJson - arduinojson.org
|
// ArduinoJson - arduinojson.org
|
||||||
// Copyright Benoit Blanchon 2014-2018
|
// Copyright Benoit Blanchon 2014-2019
|
||||||
// MIT License
|
// MIT License
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
@ -90,5 +90,5 @@ class List {
|
|||||||
private:
|
private:
|
||||||
node_type *_firstNode;
|
node_type *_firstNode;
|
||||||
};
|
};
|
||||||
}
|
} // namespace Internals
|
||||||
}
|
} // namespace ArduinoJson
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// ArduinoJson - arduinojson.org
|
// ArduinoJson - arduinojson.org
|
||||||
// Copyright Benoit Blanchon 2014-2018
|
// Copyright Benoit Blanchon 2014-2019
|
||||||
// MIT License
|
// MIT License
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
@ -46,5 +46,5 @@ class ListConstIterator {
|
|||||||
private:
|
private:
|
||||||
const ListNode<T> *_node;
|
const ListNode<T> *_node;
|
||||||
};
|
};
|
||||||
}
|
} // namespace Internals
|
||||||
}
|
} // namespace ArduinoJson
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// ArduinoJson - arduinojson.org
|
// ArduinoJson - arduinojson.org
|
||||||
// Copyright Benoit Blanchon 2014-2018
|
// Copyright Benoit Blanchon 2014-2019
|
||||||
// MIT License
|
// MIT License
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
@ -56,5 +56,5 @@ class ListIterator {
|
|||||||
private:
|
private:
|
||||||
ListNode<T> *_node;
|
ListNode<T> *_node;
|
||||||
};
|
};
|
||||||
}
|
} // namespace Internals
|
||||||
}
|
} // namespace ArduinoJson
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// ArduinoJson - arduinojson.org
|
// ArduinoJson - arduinojson.org
|
||||||
// Copyright Benoit Blanchon 2014-2018
|
// Copyright Benoit Blanchon 2014-2019
|
||||||
// MIT License
|
// MIT License
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
@ -20,5 +20,5 @@ struct ListNode : public Internals::JsonBufferAllocated {
|
|||||||
ListNode<T> *next;
|
ListNode<T> *next;
|
||||||
T content;
|
T content;
|
||||||
};
|
};
|
||||||
}
|
} // namespace Internals
|
||||||
}
|
} // namespace ArduinoJson
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// ArduinoJson - arduinojson.org
|
// ArduinoJson - arduinojson.org
|
||||||
// Copyright Benoit Blanchon 2014-2018
|
// Copyright Benoit Blanchon 2014-2019
|
||||||
// MIT License
|
// MIT License
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
@ -19,5 +19,5 @@ class NonCopyable {
|
|||||||
// copy operator is private
|
// copy operator is private
|
||||||
NonCopyable& operator=(const NonCopyable&);
|
NonCopyable& operator=(const NonCopyable&);
|
||||||
};
|
};
|
||||||
}
|
} // namespace Internals
|
||||||
}
|
} // namespace ArduinoJson
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// ArduinoJson - arduinojson.org
|
// ArduinoJson - arduinojson.org
|
||||||
// Copyright Benoit Blanchon 2014-2018
|
// Copyright Benoit Blanchon 2014-2019
|
||||||
// MIT License
|
// MIT License
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
@ -20,5 +20,5 @@ class ReferenceType {
|
|||||||
return this != &other;
|
return this != &other;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
} // namespace Internals
|
||||||
}
|
} // namespace ArduinoJson
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// ArduinoJson - arduinojson.org
|
// ArduinoJson - arduinojson.org
|
||||||
// Copyright Benoit Blanchon 2014-2018
|
// Copyright Benoit Blanchon 2014-2019
|
||||||
// MIT License
|
// MIT License
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
@ -48,5 +48,5 @@ struct ValueSaver<
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
} // namespace Internals
|
||||||
}
|
} // namespace ArduinoJson
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// ArduinoJson - arduinojson.org
|
// ArduinoJson - arduinojson.org
|
||||||
// Copyright Benoit Blanchon 2014-2018
|
// Copyright Benoit Blanchon 2014-2019
|
||||||
// MIT License
|
// MIT License
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
@ -57,5 +57,5 @@ void skipSpacesAndComments(TInput& input) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
} // namespace Internals
|
||||||
}
|
} // namespace ArduinoJson
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// ArduinoJson - arduinojson.org
|
// ArduinoJson - arduinojson.org
|
||||||
// Copyright Benoit Blanchon 2014-2018
|
// Copyright Benoit Blanchon 2014-2019
|
||||||
// MIT License
|
// MIT License
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// ArduinoJson - arduinojson.org
|
// ArduinoJson - arduinojson.org
|
||||||
// Copyright Benoit Blanchon 2014-2018
|
// Copyright Benoit Blanchon 2014-2019
|
||||||
// MIT License
|
// MIT License
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// ArduinoJson - arduinojson.org
|
// ArduinoJson - arduinojson.org
|
||||||
// Copyright Benoit Blanchon 2014-2018
|
// Copyright Benoit Blanchon 2014-2019
|
||||||
// MIT License
|
// MIT License
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
@ -37,5 +37,5 @@ class StringWriter {
|
|||||||
private:
|
private:
|
||||||
TChar* _ptr;
|
TChar* _ptr;
|
||||||
};
|
};
|
||||||
}
|
} // namespace Internals
|
||||||
}
|
} // namespace ArduinoJson
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// ArduinoJson - arduinojson.org
|
// ArduinoJson - arduinojson.org
|
||||||
// Copyright Benoit Blanchon 2014-2018
|
// Copyright Benoit Blanchon 2014-2019
|
||||||
// MIT License
|
// MIT License
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
@ -152,7 +152,7 @@ class DynamicJsonBufferBase
|
|||||||
Block* _head;
|
Block* _head;
|
||||||
size_t _nextBlockCapacity;
|
size_t _nextBlockCapacity;
|
||||||
};
|
};
|
||||||
}
|
} // namespace Internals
|
||||||
|
|
||||||
#if defined(__clang__)
|
#if defined(__clang__)
|
||||||
#pragma clang diagnostic pop
|
#pragma clang diagnostic pop
|
||||||
@ -167,4 +167,4 @@ class DynamicJsonBufferBase
|
|||||||
// more suitable for embedded systems.
|
// more suitable for embedded systems.
|
||||||
typedef Internals::DynamicJsonBufferBase<Internals::DefaultAllocator>
|
typedef Internals::DynamicJsonBufferBase<Internals::DefaultAllocator>
|
||||||
DynamicJsonBuffer;
|
DynamicJsonBuffer;
|
||||||
}
|
} // namespace ArduinoJson
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// ArduinoJson - arduinojson.org
|
// ArduinoJson - arduinojson.org
|
||||||
// Copyright Benoit Blanchon 2014-2018
|
// Copyright Benoit Blanchon 2014-2019
|
||||||
// MIT License
|
// MIT License
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
@ -223,5 +223,5 @@ struct JsonVariantDefault<JsonArray> {
|
|||||||
return JsonArray::invalid();
|
return JsonArray::invalid();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
} // namespace Internals
|
||||||
}
|
} // namespace ArduinoJson
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// ArduinoJson - arduinojson.org
|
// ArduinoJson - arduinojson.org
|
||||||
// Copyright Benoit Blanchon 2014-2018
|
// Copyright Benoit Blanchon 2014-2019
|
||||||
// MIT License
|
// MIT License
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
@ -23,4 +23,4 @@ inline JsonObject &JsonArray::createNestedObject() {
|
|||||||
add(object);
|
add(object);
|
||||||
return object;
|
return object;
|
||||||
}
|
}
|
||||||
}
|
} // namespace ArduinoJson
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// ArduinoJson - arduinojson.org
|
// ArduinoJson - arduinojson.org
|
||||||
// Copyright Benoit Blanchon 2014-2018
|
// Copyright Benoit Blanchon 2014-2019
|
||||||
// MIT License
|
// MIT License
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
@ -105,7 +105,7 @@ inline std::ostream& operator<<(std::ostream& os,
|
|||||||
return source.printTo(os);
|
return source.printTo(os);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
} // namespace Internals
|
||||||
|
|
||||||
inline Internals::JsonArraySubscript JsonArray::operator[](size_t index) {
|
inline Internals::JsonArraySubscript JsonArray::operator[](size_t index) {
|
||||||
return Internals::JsonArraySubscript(*this, index);
|
return Internals::JsonArraySubscript(*this, index);
|
||||||
@ -115,7 +115,7 @@ inline const Internals::JsonArraySubscript JsonArray::operator[](
|
|||||||
size_t index) const {
|
size_t index) const {
|
||||||
return Internals::JsonArraySubscript(*const_cast<JsonArray*>(this), index);
|
return Internals::JsonArraySubscript(*const_cast<JsonArray*>(this), index);
|
||||||
}
|
}
|
||||||
}
|
} // namespace ArduinoJson
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
#ifdef _MSC_VER
|
||||||
#pragma warning(pop)
|
#pragma warning(pop)
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// ArduinoJson - arduinojson.org
|
// ArduinoJson - arduinojson.org
|
||||||
// Copyright Benoit Blanchon 2014-2018
|
// Copyright Benoit Blanchon 2014-2019
|
||||||
// MIT License
|
// MIT License
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
@ -75,4 +75,4 @@ class JsonBuffer : Internals::NonCopyable {
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
} // namespace ArduinoJson
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// ArduinoJson - arduinojson.org
|
// ArduinoJson - arduinojson.org
|
||||||
// Copyright Benoit Blanchon 2014-2018
|
// Copyright Benoit Blanchon 2014-2019
|
||||||
// MIT License
|
// MIT License
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
@ -123,5 +123,5 @@ class JsonBufferBase : public JsonBuffer {
|
|||||||
return static_cast<TDerived *>(this);
|
return static_cast<TDerived *>(this);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
} // namespace Internals
|
||||||
}
|
} // namespace ArduinoJson
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// ArduinoJson - arduinojson.org
|
// ArduinoJson - arduinojson.org
|
||||||
// Copyright Benoit Blanchon 2014-2018
|
// Copyright Benoit Blanchon 2014-2019
|
||||||
// MIT License
|
// MIT License
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// ArduinoJson - arduinojson.org
|
// ArduinoJson - arduinojson.org
|
||||||
// Copyright Benoit Blanchon 2014-2018
|
// Copyright Benoit Blanchon 2014-2019
|
||||||
// MIT License
|
// MIT License
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// ArduinoJson - arduinojson.org
|
// ArduinoJson - arduinojson.org
|
||||||
// Copyright Benoit Blanchon 2014-2018
|
// Copyright Benoit Blanchon 2014-2019
|
||||||
// MIT License
|
// MIT License
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
@ -25,4 +25,4 @@ inline JsonObject &JsonObject::createNestedObject_impl(TStringRef key) {
|
|||||||
set(key, object);
|
set(key, object);
|
||||||
return object;
|
return object;
|
||||||
}
|
}
|
||||||
}
|
} // namespace ArduinoJson
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// ArduinoJson - arduinojson.org
|
// ArduinoJson - arduinojson.org
|
||||||
// Copyright Benoit Blanchon 2014-2018
|
// Copyright Benoit Blanchon 2014-2019
|
||||||
// MIT License
|
// MIT License
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
@ -102,8 +102,8 @@ inline std::ostream& operator<<(std::ostream& os,
|
|||||||
return source.printTo(os);
|
return source.printTo(os);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
} // namespace Internals
|
||||||
}
|
} // namespace ArduinoJson
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
#ifdef _MSC_VER
|
||||||
#pragma warning(pop)
|
#pragma warning(pop)
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// ArduinoJson - arduinojson.org
|
// ArduinoJson - arduinojson.org
|
||||||
// Copyright Benoit Blanchon 2014-2018
|
// Copyright Benoit Blanchon 2014-2019
|
||||||
// MIT License
|
// MIT License
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
@ -13,4 +13,4 @@ struct JsonPair {
|
|||||||
const char* key;
|
const char* key;
|
||||||
JsonVariant value;
|
JsonVariant value;
|
||||||
};
|
};
|
||||||
}
|
} // namespace ArduinoJson
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// ArduinoJson - arduinojson.org
|
// ArduinoJson - arduinojson.org
|
||||||
// Copyright Benoit Blanchon 2014-2018
|
// Copyright Benoit Blanchon 2014-2019
|
||||||
// MIT License
|
// MIT License
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// ArduinoJson - arduinojson.org
|
// ArduinoJson - arduinojson.org
|
||||||
// Copyright Benoit Blanchon 2014-2018
|
// Copyright Benoit Blanchon 2014-2019
|
||||||
// MIT License
|
// MIT License
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
@ -20,5 +20,5 @@ class JsonVariantBase : public JsonPrintable<TImpl>,
|
|||||||
public JsonVariantOr<TImpl>,
|
public JsonVariantOr<TImpl>,
|
||||||
public JsonVariantSubscripts<TImpl>,
|
public JsonVariantSubscripts<TImpl>,
|
||||||
public JsonVariantTag {};
|
public JsonVariantTag {};
|
||||||
}
|
} // namespace Internals
|
||||||
}
|
} // namespace ArduinoJson
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// ArduinoJson - arduinojson.org
|
// ArduinoJson - arduinojson.org
|
||||||
// Copyright Benoit Blanchon 2014-2018
|
// Copyright Benoit Blanchon 2014-2019
|
||||||
// MIT License
|
// MIT License
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
@ -55,5 +55,5 @@ class JsonVariantCasts {
|
|||||||
return static_cast<const TImpl *>(this);
|
return static_cast<const TImpl *>(this);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
} // namespace Internals
|
||||||
}
|
} // namespace ArduinoJson
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// ArduinoJson - arduinojson.org
|
// ArduinoJson - arduinojson.org
|
||||||
// Copyright Benoit Blanchon 2014-2018
|
// Copyright Benoit Blanchon 2014-2019
|
||||||
// MIT License
|
// MIT License
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// ArduinoJson - arduinojson.org
|
// ArduinoJson - arduinojson.org
|
||||||
// Copyright Benoit Blanchon 2014-2018
|
// Copyright Benoit Blanchon 2014-2019
|
||||||
// MIT License
|
// MIT License
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
@ -23,6 +23,7 @@ inline JsonVariant::JsonVariant(const JsonArray &array) {
|
|||||||
_content.asArray = const_cast<JsonArray *>(&array);
|
_content.asArray = const_cast<JsonArray *>(&array);
|
||||||
} else {
|
} else {
|
||||||
_type = Internals::JSON_UNDEFINED;
|
_type = Internals::JSON_UNDEFINED;
|
||||||
|
_content.asArray = 0; // <- prevent warning 'maybe-uninitialized'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -32,6 +33,7 @@ inline JsonVariant::JsonVariant(const JsonObject &object) {
|
|||||||
_content.asObject = const_cast<JsonObject *>(&object);
|
_content.asObject = const_cast<JsonObject *>(&object);
|
||||||
} else {
|
} else {
|
||||||
_type = Internals::JSON_UNDEFINED;
|
_type = Internals::JSON_UNDEFINED;
|
||||||
|
_content.asObject = 0; // <- prevent warning 'maybe-uninitialized'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// ArduinoJson - arduinojson.org
|
// ArduinoJson - arduinojson.org
|
||||||
// Copyright Benoit Blanchon 2014-2018
|
// Copyright Benoit Blanchon 2014-2019
|
||||||
// MIT License
|
// MIT License
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// ArduinoJson - arduinojson.org
|
// ArduinoJson - arduinojson.org
|
||||||
// Copyright Benoit Blanchon 2014-2018
|
// Copyright Benoit Blanchon 2014-2019
|
||||||
// MIT License
|
// MIT License
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
@ -82,5 +82,5 @@ class JsonVariantSubscripts {
|
|||||||
return static_cast<const TImpl *>(this);
|
return static_cast<const TImpl *>(this);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
} // namespace Internals
|
||||||
}
|
} // namespace ArduinoJson
|
||||||
|
31
src/ArduinoJson/Polyfills/alias_cast.hpp
Normal file
31
src/ArduinoJson/Polyfills/alias_cast.hpp
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
// ArduinoJson - arduinojson.org
|
||||||
|
// Copyright Benoit Blanchon 2014-2019
|
||||||
|
// MIT License
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include <stdint.h>
|
||||||
|
#include <stdlib.h> // for size_t
|
||||||
|
#include "../Configuration.hpp"
|
||||||
|
#include "../Polyfills/math.hpp"
|
||||||
|
|
||||||
|
namespace ArduinoJson {
|
||||||
|
namespace Internals {
|
||||||
|
|
||||||
|
template <typename T, typename F>
|
||||||
|
struct alias_cast_t {
|
||||||
|
union {
|
||||||
|
F raw;
|
||||||
|
T data;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
template <typename T, typename F>
|
||||||
|
T alias_cast(F raw_data) {
|
||||||
|
alias_cast_t<T, F> ac;
|
||||||
|
ac.raw = raw_data;
|
||||||
|
return ac.data;
|
||||||
|
}
|
||||||
|
|
||||||
|
} // namespace Internals
|
||||||
|
} // namespace ArduinoJson
|
@ -1,5 +1,5 @@
|
|||||||
// ArduinoJson - arduinojson.org
|
// ArduinoJson - arduinojson.org
|
||||||
// Copyright Benoit Blanchon 2014-2018
|
// Copyright Benoit Blanchon 2014-2019
|
||||||
// MIT License
|
// MIT License
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// ArduinoJson - arduinojson.org
|
// ArduinoJson - arduinojson.org
|
||||||
// Copyright Benoit Blanchon 2014-2018
|
// Copyright Benoit Blanchon 2014-2019
|
||||||
// MIT License
|
// MIT License
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
@ -14,5 +14,5 @@ inline bool isdigit(char c) {
|
|||||||
inline bool issign(char c) {
|
inline bool issign(char c) {
|
||||||
return '-' == c || c == '+';
|
return '-' == c || c == '+';
|
||||||
}
|
}
|
||||||
}
|
} // namespace Internals
|
||||||
}
|
} // namespace ArduinoJson
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// ArduinoJson - arduinojson.org
|
// ArduinoJson - arduinojson.org
|
||||||
// Copyright Benoit Blanchon 2014-2018
|
// Copyright Benoit Blanchon 2014-2019
|
||||||
// MIT License
|
// MIT License
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
@ -34,5 +34,5 @@ inline bool isFloat(const char* s) {
|
|||||||
|
|
||||||
return *s == '\0';
|
return *s == '\0';
|
||||||
}
|
}
|
||||||
}
|
} // namespace Internals
|
||||||
}
|
} // namespace ArduinoJson
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// ArduinoJson - arduinojson.org
|
// ArduinoJson - arduinojson.org
|
||||||
// Copyright Benoit Blanchon 2014-2018
|
// Copyright Benoit Blanchon 2014-2019
|
||||||
// MIT License
|
// MIT License
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// ArduinoJson - arduinojson.org
|
// ArduinoJson - arduinojson.org
|
||||||
// Copyright Benoit Blanchon 2014-2018
|
// Copyright Benoit Blanchon 2014-2019
|
||||||
// MIT License
|
// MIT License
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
@ -15,5 +15,5 @@ template <typename T>
|
|||||||
bool isInfinity(T x) {
|
bool isInfinity(T x) {
|
||||||
return x != 0.0 && x * 2 == x;
|
return x != 0.0 && x * 2 == x;
|
||||||
}
|
}
|
||||||
}
|
} // namespace Internals
|
||||||
}
|
} // namespace ArduinoJson
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// ArduinoJson - arduinojson.org
|
// ArduinoJson - arduinojson.org
|
||||||
// Copyright Benoit Blanchon 2014-2018
|
// Copyright Benoit Blanchon 2014-2019
|
||||||
// MIT License
|
// MIT License
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
@ -86,5 +86,5 @@ inline T parseFloat(const char* s) {
|
|||||||
|
|
||||||
return negative_result ? -result : result;
|
return negative_result ? -result : result;
|
||||||
}
|
}
|
||||||
}
|
} // namespace Internals
|
||||||
}
|
} // namespace ArduinoJson
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// ArduinoJson - arduinojson.org
|
// ArduinoJson - arduinojson.org
|
||||||
// Copyright Benoit Blanchon 2014-2018
|
// Copyright Benoit Blanchon 2014-2019
|
||||||
// MIT License
|
// MIT License
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
@ -37,5 +37,5 @@ T parseInteger(const char *s) {
|
|||||||
|
|
||||||
return negative_result ? T(~result + 1) : result;
|
return negative_result ? T(~result + 1) : result;
|
||||||
}
|
}
|
||||||
}
|
} // namespace Internals
|
||||||
}
|
} // namespace ArduinoJson
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// ArduinoJson - arduinojson.org
|
// ArduinoJson - arduinojson.org
|
||||||
// Copyright Benoit Blanchon 2014-2018
|
// Copyright Benoit Blanchon 2014-2019
|
||||||
// MIT License
|
// MIT License
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
@ -37,10 +37,10 @@ struct StringTraits<RawJsonString<String>, void> {
|
|||||||
static const bool has_equals = false;
|
static const bool has_equals = false;
|
||||||
static const bool should_duplicate = StringTraits<String>::should_duplicate;
|
static const bool should_duplicate = StringTraits<String>::should_duplicate;
|
||||||
};
|
};
|
||||||
}
|
} // namespace Internals
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
inline Internals::RawJsonString<T> RawJson(T str) {
|
inline Internals::RawJsonString<T> RawJson(T str) {
|
||||||
return Internals::RawJsonString<T>(str);
|
return Internals::RawJsonString<T>(str);
|
||||||
}
|
}
|
||||||
}
|
} // namespace ArduinoJson
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// ArduinoJson - arduinojson.org
|
// ArduinoJson - arduinojson.org
|
||||||
// Copyright Benoit Blanchon 2014-2018
|
// Copyright Benoit Blanchon 2014-2019
|
||||||
// MIT License
|
// MIT License
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
@ -18,5 +18,5 @@ class DummyPrint {
|
|||||||
return strlen(s);
|
return strlen(s);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
} // namespace Internals
|
||||||
}
|
} // namespace ArduinoJson
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// ArduinoJson - arduinojson.org
|
// ArduinoJson - arduinojson.org
|
||||||
// Copyright Benoit Blanchon 2014-2018
|
// Copyright Benoit Blanchon 2014-2019
|
||||||
// MIT License
|
// MIT License
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
@ -31,5 +31,5 @@ class DynamicStringBuilder {
|
|||||||
|
|
||||||
TString &_str;
|
TString &_str;
|
||||||
};
|
};
|
||||||
}
|
} // namespace Internals
|
||||||
}
|
} // namespace ArduinoJson
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// ArduinoJson - arduinojson.org
|
// ArduinoJson - arduinojson.org
|
||||||
// Copyright Benoit Blanchon 2014-2018
|
// Copyright Benoit Blanchon 2014-2019
|
||||||
// MIT License
|
// MIT License
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
@ -85,5 +85,5 @@ struct FloatParts {
|
|||||||
return powersOf10;
|
return powersOf10;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
} // namespace Internals
|
||||||
}
|
} // namespace ArduinoJson
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// ArduinoJson - arduinojson.org
|
// ArduinoJson - arduinojson.org
|
||||||
// Copyright Benoit Blanchon 2014-2018
|
// Copyright Benoit Blanchon 2014-2019
|
||||||
// MIT License
|
// MIT License
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
@ -64,5 +64,5 @@ class IndentedPrint {
|
|||||||
static const int MAX_LEVEL = 15; // because it's only 4 bits
|
static const int MAX_LEVEL = 15; // because it's only 4 bits
|
||||||
static const int MAX_TAB_SIZE = 7; // because it's only 3 bits
|
static const int MAX_TAB_SIZE = 7; // because it's only 3 bits
|
||||||
};
|
};
|
||||||
}
|
} // namespace Internals
|
||||||
}
|
} // namespace ArduinoJson
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// ArduinoJson - arduinojson.org
|
// ArduinoJson - arduinojson.org
|
||||||
// Copyright Benoit Blanchon 2014-2018
|
// Copyright Benoit Blanchon 2014-2019
|
||||||
// MIT License
|
// MIT License
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
@ -113,5 +113,5 @@ inline std::ostream &operator<<(std::ostream &os, const JsonPrintable<T> &v) {
|
|||||||
return v.printTo(os);
|
return v.printTo(os);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
} // namespace Internals
|
||||||
}
|
} // namespace ArduinoJson
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// ArduinoJson - arduinojson.org
|
// ArduinoJson - arduinojson.org
|
||||||
// Copyright Benoit Blanchon 2014-2018
|
// Copyright Benoit Blanchon 2014-2019
|
||||||
// MIT License
|
// MIT License
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
@ -28,5 +28,5 @@ class JsonSerializer {
|
|||||||
static void serialize(const JsonObjectSubscript<TKey> &, Writer &);
|
static void serialize(const JsonObjectSubscript<TKey> &, Writer &);
|
||||||
static void serialize(const JsonVariant &, Writer &);
|
static void serialize(const JsonVariant &, Writer &);
|
||||||
};
|
};
|
||||||
}
|
} // namespace Internals
|
||||||
}
|
} // namespace ArduinoJson
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// ArduinoJson - arduinojson.org
|
// ArduinoJson - arduinojson.org
|
||||||
// Copyright Benoit Blanchon 2014-2018
|
// Copyright Benoit Blanchon 2014-2019
|
||||||
// MIT License
|
// MIT License
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// ArduinoJson - arduinojson.org
|
// ArduinoJson - arduinojson.org
|
||||||
// Copyright Benoit Blanchon 2014-2018
|
// Copyright Benoit Blanchon 2014-2019
|
||||||
// MIT License
|
// MIT License
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
@ -151,5 +151,5 @@ class JsonWriter {
|
|||||||
private:
|
private:
|
||||||
JsonWriter &operator=(const JsonWriter &); // cannot be assigned
|
JsonWriter &operator=(const JsonWriter &); // cannot be assigned
|
||||||
};
|
};
|
||||||
}
|
} // namespace Internals
|
||||||
}
|
} // namespace ArduinoJson
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// ArduinoJson - arduinojson.org
|
// ArduinoJson - arduinojson.org
|
||||||
// Copyright Benoit Blanchon 2014-2018
|
// Copyright Benoit Blanchon 2014-2019
|
||||||
// MIT License
|
// MIT License
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
@ -129,5 +129,5 @@ class Prettyfier {
|
|||||||
IndentedPrint<Print>& _sink;
|
IndentedPrint<Print>& _sink;
|
||||||
bool _inString;
|
bool _inString;
|
||||||
};
|
};
|
||||||
}
|
} // namespace Internals
|
||||||
}
|
} // namespace ArduinoJson
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// ArduinoJson - arduinojson.org
|
// ArduinoJson - arduinojson.org
|
||||||
// Copyright Benoit Blanchon 2014-2018
|
// Copyright Benoit Blanchon 2014-2019
|
||||||
// MIT License
|
// MIT License
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
@ -32,5 +32,5 @@ class StaticStringBuilder {
|
|||||||
char *end;
|
char *end;
|
||||||
char *p;
|
char *p;
|
||||||
};
|
};
|
||||||
}
|
} // namespace Internals
|
||||||
}
|
} // namespace ArduinoJson
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// ArduinoJson - arduinojson.org
|
// ArduinoJson - arduinojson.org
|
||||||
// Copyright Benoit Blanchon 2014-2018
|
// Copyright Benoit Blanchon 2014-2019
|
||||||
// MIT License
|
// MIT License
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
@ -33,7 +33,7 @@ class StreamPrintAdapter {
|
|||||||
|
|
||||||
std::ostream& _os;
|
std::ostream& _os;
|
||||||
};
|
};
|
||||||
}
|
} // namespace Internals
|
||||||
}
|
} // namespace ArduinoJson
|
||||||
|
|
||||||
#endif // ARDUINOJSON_ENABLE_STD_STREAM
|
#endif // ARDUINOJSON_ENABLE_STD_STREAM
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// ArduinoJson - arduinojson.org
|
// ArduinoJson - arduinojson.org
|
||||||
// Copyright Benoit Blanchon 2014-2018
|
// Copyright Benoit Blanchon 2014-2019
|
||||||
// MIT License
|
// MIT License
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
@ -91,7 +91,7 @@ class StaticJsonBufferBase : public JsonBufferBase<StaticJsonBufferBase> {
|
|||||||
size_t _capacity;
|
size_t _capacity;
|
||||||
size_t _size;
|
size_t _size;
|
||||||
};
|
};
|
||||||
}
|
} // namespace Internals
|
||||||
|
|
||||||
#if defined(__clang__)
|
#if defined(__clang__)
|
||||||
#pragma clang diagnostic push
|
#pragma clang diagnostic push
|
||||||
@ -115,7 +115,7 @@ class StaticJsonBuffer : public Internals::StaticJsonBufferBase {
|
|||||||
private:
|
private:
|
||||||
char _buffer[CAPACITY];
|
char _buffer[CAPACITY];
|
||||||
};
|
};
|
||||||
}
|
} // namespace ArduinoJson
|
||||||
|
|
||||||
#if defined(__clang__)
|
#if defined(__clang__)
|
||||||
#pragma clang diagnostic pop
|
#pragma clang diagnostic pop
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// ArduinoJson - arduinojson.org
|
// ArduinoJson - arduinojson.org
|
||||||
// Copyright Benoit Blanchon 2014-2018
|
// Copyright Benoit Blanchon 2014-2019
|
||||||
// MIT License
|
// MIT License
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
@ -55,7 +55,7 @@ struct StringTraits<
|
|||||||
typename EnableIf<
|
typename EnableIf<
|
||||||
IsBaseOf<Stream, typename RemoveReference<TStream>::type>::value>::type>
|
IsBaseOf<Stream, typename RemoveReference<TStream>::type>::value>::type>
|
||||||
: ArduinoStreamTraits {};
|
: ArduinoStreamTraits {};
|
||||||
}
|
} // namespace Internals
|
||||||
}
|
} // namespace ArduinoJson
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// ArduinoJson - arduinojson.org
|
// ArduinoJson - arduinojson.org
|
||||||
// Copyright Benoit Blanchon 2014-2018
|
// Copyright Benoit Blanchon 2014-2019
|
||||||
// MIT License
|
// MIT License
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// ArduinoJson - arduinojson.org
|
// ArduinoJson - arduinojson.org
|
||||||
// Copyright Benoit Blanchon 2014-2018
|
// Copyright Benoit Blanchon 2014-2019
|
||||||
// MIT License
|
// MIT License
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// ArduinoJson - arduinojson.org
|
// ArduinoJson - arduinojson.org
|
||||||
// Copyright Benoit Blanchon 2014-2018
|
// Copyright Benoit Blanchon 2014-2019
|
||||||
// MIT License
|
// MIT License
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
@ -54,7 +54,7 @@ struct StringTraits<
|
|||||||
typename EnableIf<IsBaseOf<
|
typename EnableIf<IsBaseOf<
|
||||||
std::istream, typename RemoveReference<TStream>::type>::value>::type>
|
std::istream, typename RemoveReference<TStream>::type>::value>::type>
|
||||||
: StdStreamTraits {};
|
: StdStreamTraits {};
|
||||||
}
|
} // namespace Internals
|
||||||
}
|
} // namespace ArduinoJson
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// ArduinoJson - arduinojson.org
|
// ArduinoJson - arduinojson.org
|
||||||
// Copyright Benoit Blanchon 2014-2018
|
// Copyright Benoit Blanchon 2014-2019
|
||||||
// MIT License
|
// MIT License
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// ArduinoJson - arduinojson.org
|
// ArduinoJson - arduinojson.org
|
||||||
// Copyright Benoit Blanchon 2014-2018
|
// Copyright Benoit Blanchon 2014-2019
|
||||||
// MIT License
|
// MIT License
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
@ -26,8 +26,8 @@ struct StringTraits<const TString, void> : StringTraits<TString> {};
|
|||||||
|
|
||||||
template <typename TString>
|
template <typename TString>
|
||||||
struct StringTraits<TString&, void> : StringTraits<TString> {};
|
struct StringTraits<TString&, void> : StringTraits<TString> {};
|
||||||
}
|
} // namespace Internals
|
||||||
}
|
} // namespace ArduinoJson
|
||||||
|
|
||||||
#include "ArduinoStream.hpp"
|
#include "ArduinoStream.hpp"
|
||||||
#include "CharPointer.hpp"
|
#include "CharPointer.hpp"
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// ArduinoJson - arduinojson.org
|
// ArduinoJson - arduinojson.org
|
||||||
// Copyright Benoit Blanchon 2014-2018
|
// Copyright Benoit Blanchon 2014-2019
|
||||||
// MIT License
|
// MIT License
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
@ -15,5 +15,5 @@ template <typename T>
|
|||||||
struct EnableIf<true, T> {
|
struct EnableIf<true, T> {
|
||||||
typedef T type;
|
typedef T type;
|
||||||
};
|
};
|
||||||
}
|
} // namespace Internals
|
||||||
}
|
} // namespace ArduinoJson
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// ArduinoJson - arduinojson.org
|
// ArduinoJson - arduinojson.org
|
||||||
// Copyright Benoit Blanchon 2014-2018
|
// Copyright Benoit Blanchon 2014-2019
|
||||||
// MIT License
|
// MIT License
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
@ -7,6 +7,7 @@
|
|||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <stdlib.h> // for size_t
|
#include <stdlib.h> // for size_t
|
||||||
#include "../Configuration.hpp"
|
#include "../Configuration.hpp"
|
||||||
|
#include "../Polyfills/alias_cast.hpp"
|
||||||
#include "../Polyfills/math.hpp"
|
#include "../Polyfills/math.hpp"
|
||||||
|
|
||||||
namespace ArduinoJson {
|
namespace ArduinoJson {
|
||||||
@ -99,12 +100,7 @@ struct FloatTraits<T, 8 /*64bits*/> {
|
|||||||
// we use this function to workaround platforms with single precision literals
|
// we use this function to workaround platforms with single precision literals
|
||||||
// (for example, when -fsingle-precision-constant is passed to GCC)
|
// (for example, when -fsingle-precision-constant is passed to GCC)
|
||||||
static T forge(uint32_t msb, uint32_t lsb) {
|
static T forge(uint32_t msb, uint32_t lsb) {
|
||||||
union {
|
return alias_cast<T>((uint64_t(msb) << 32) | lsb);
|
||||||
uint64_t integerBits;
|
|
||||||
T floatBits;
|
|
||||||
};
|
|
||||||
integerBits = (uint64_t(msb) << 32) | lsb;
|
|
||||||
return floatBits;
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -151,12 +147,7 @@ struct FloatTraits<T, 4 /*32bits*/> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static T forge(uint32_t bits) {
|
static T forge(uint32_t bits) {
|
||||||
union {
|
return alias_cast<T>(bits);
|
||||||
uint32_t integerBits;
|
|
||||||
T floatBits;
|
|
||||||
};
|
|
||||||
integerBits = bits;
|
|
||||||
return floatBits;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static T nan() {
|
static T nan() {
|
||||||
@ -167,5 +158,5 @@ struct FloatTraits<T, 4 /*32bits*/> {
|
|||||||
return forge(0x7f800000);
|
return forge(0x7f800000);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
} // namespace Internals
|
||||||
}
|
} // namespace ArduinoJson
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// ArduinoJson - arduinojson.org
|
// ArduinoJson - arduinojson.org
|
||||||
// Copyright Benoit Blanchon 2014-2018
|
// Copyright Benoit Blanchon 2014-2019
|
||||||
// MIT License
|
// MIT License
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
@ -20,5 +20,5 @@ template <typename T, size_t N>
|
|||||||
struct IsArray<T[N]> {
|
struct IsArray<T[N]> {
|
||||||
static const bool value = true;
|
static const bool value = true;
|
||||||
};
|
};
|
||||||
}
|
} // namespace Internals
|
||||||
}
|
} // namespace ArduinoJson
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// ArduinoJson - arduinojson.org
|
// ArduinoJson - arduinojson.org
|
||||||
// Copyright Benoit Blanchon 2014-2018
|
// Copyright Benoit Blanchon 2014-2019
|
||||||
// MIT License
|
// MIT License
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
@ -23,5 +23,5 @@ class IsBaseOf {
|
|||||||
value = sizeof(probe(reinterpret_cast<TDerived *>(0))) == sizeof(Yes)
|
value = sizeof(probe(reinterpret_cast<TDerived *>(0))) == sizeof(Yes)
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
} // namespace Internals
|
||||||
}
|
} // namespace ArduinoJson
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// ArduinoJson - arduinojson.org
|
// ArduinoJson - arduinojson.org
|
||||||
// Copyright Benoit Blanchon 2014-2018
|
// Copyright Benoit Blanchon 2014-2019
|
||||||
// MIT License
|
// MIT License
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
@ -19,5 +19,5 @@ struct IsChar {
|
|||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
struct IsChar<const T> : IsChar<T> {};
|
struct IsChar<const T> : IsChar<T> {};
|
||||||
}
|
} // namespace Internals
|
||||||
}
|
} // namespace ArduinoJson
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// ArduinoJson - arduinojson.org
|
// ArduinoJson - arduinojson.org
|
||||||
// Copyright Benoit Blanchon 2014-2018
|
// Copyright Benoit Blanchon 2014-2019
|
||||||
// MIT License
|
// MIT License
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
@ -17,5 +17,5 @@ template <typename T>
|
|||||||
struct IsConst<const T> {
|
struct IsConst<const T> {
|
||||||
static const bool value = true;
|
static const bool value = true;
|
||||||
};
|
};
|
||||||
}
|
} // namespace Internals
|
||||||
}
|
} // namespace ArduinoJson
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// ArduinoJson - arduinojson.org
|
// ArduinoJson - arduinojson.org
|
||||||
// Copyright Benoit Blanchon 2014-2018
|
// Copyright Benoit Blanchon 2014-2019
|
||||||
// MIT License
|
// MIT License
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
@ -14,5 +14,5 @@ template <typename T>
|
|||||||
struct IsFloatingPoint {
|
struct IsFloatingPoint {
|
||||||
static const bool value = IsSame<T, float>::value || IsSame<T, double>::value;
|
static const bool value = IsSame<T, float>::value || IsSame<T, double>::value;
|
||||||
};
|
};
|
||||||
}
|
} // namespace Internals
|
||||||
}
|
} // namespace ArduinoJson
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// ArduinoJson - arduinojson.org
|
// ArduinoJson - arduinojson.org
|
||||||
// Copyright Benoit Blanchon 2014-2018
|
// Copyright Benoit Blanchon 2014-2019
|
||||||
// MIT License
|
// MIT License
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
@ -22,5 +22,5 @@ struct IsIntegral {
|
|||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
struct IsIntegral<const T> : IsIntegral<T> {};
|
struct IsIntegral<const T> : IsIntegral<T> {};
|
||||||
}
|
} // namespace Internals
|
||||||
}
|
} // namespace ArduinoJson
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// ArduinoJson - arduinojson.org
|
// ArduinoJson - arduinojson.org
|
||||||
// Copyright Benoit Blanchon 2014-2018
|
// Copyright Benoit Blanchon 2014-2019
|
||||||
// MIT License
|
// MIT License
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
@ -17,5 +17,5 @@ template <typename T>
|
|||||||
struct IsSame<T, T> {
|
struct IsSame<T, T> {
|
||||||
static const bool value = true;
|
static const bool value = true;
|
||||||
};
|
};
|
||||||
}
|
} // namespace Internals
|
||||||
}
|
} // namespace ArduinoJson
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// ArduinoJson - arduinojson.org
|
// ArduinoJson - arduinojson.org
|
||||||
// Copyright Benoit Blanchon 2014-2018
|
// Copyright Benoit Blanchon 2014-2019
|
||||||
// MIT License
|
// MIT License
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
@ -24,5 +24,5 @@ struct IsSignedIntegral {
|
|||||||
#endif
|
#endif
|
||||||
false;
|
false;
|
||||||
};
|
};
|
||||||
}
|
} // namespace Internals
|
||||||
}
|
} // namespace ArduinoJson
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// ArduinoJson - arduinojson.org
|
// ArduinoJson - arduinojson.org
|
||||||
// Copyright Benoit Blanchon 2014-2018
|
// Copyright Benoit Blanchon 2014-2019
|
||||||
// MIT License
|
// MIT License
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
@ -24,5 +24,5 @@ struct IsUnsignedIntegral {
|
|||||||
#endif
|
#endif
|
||||||
false;
|
false;
|
||||||
};
|
};
|
||||||
}
|
} // namespace Internals
|
||||||
}
|
} // namespace ArduinoJson
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// ArduinoJson - arduinojson.org
|
// ArduinoJson - arduinojson.org
|
||||||
// Copyright Benoit Blanchon 2014-2018
|
// Copyright Benoit Blanchon 2014-2019
|
||||||
// MIT License
|
// MIT License
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
@ -13,5 +13,5 @@ class JsonVariantTag {};
|
|||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
struct IsVariant : IsBaseOf<JsonVariantTag, T> {};
|
struct IsVariant : IsBaseOf<JsonVariantTag, T> {};
|
||||||
}
|
} // namespace Internals
|
||||||
}
|
} // namespace ArduinoJson
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// ArduinoJson - arduinojson.org
|
// ArduinoJson - arduinojson.org
|
||||||
// Copyright Benoit Blanchon 2014-2018
|
// Copyright Benoit Blanchon 2014-2019
|
||||||
// MIT License
|
// MIT License
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
@ -16,5 +16,5 @@ template <typename T>
|
|||||||
struct RemoveConst<const T> {
|
struct RemoveConst<const T> {
|
||||||
typedef T type;
|
typedef T type;
|
||||||
};
|
};
|
||||||
}
|
} // namespace Internals
|
||||||
}
|
} // namespace ArduinoJson
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// ArduinoJson - arduinojson.org
|
// ArduinoJson - arduinojson.org
|
||||||
// Copyright Benoit Blanchon 2014-2018
|
// Copyright Benoit Blanchon 2014-2019
|
||||||
// MIT License
|
// MIT License
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
@ -16,5 +16,5 @@ template <typename T>
|
|||||||
struct RemoveReference<T&> {
|
struct RemoveReference<T&> {
|
||||||
typedef T type;
|
typedef T type;
|
||||||
};
|
};
|
||||||
}
|
} // namespace Internals
|
||||||
}
|
} // namespace ArduinoJson
|
||||||
|
31
src/ArduinoJson/compatibility.hpp
Normal file
31
src/ArduinoJson/compatibility.hpp
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
// ArduinoJson - arduinojson.org
|
||||||
|
// Copyright Benoit Blanchon 2014-2019
|
||||||
|
// MIT License
|
||||||
|
//
|
||||||
|
// clang-format off
|
||||||
|
|
||||||
|
#ifdef __GNUC__
|
||||||
|
|
||||||
|
#define ARDUINOJSON_PRAGMA(x) _Pragma(#x)
|
||||||
|
|
||||||
|
#define ARDUINOJSON_COMPILE_ERROR(msg) ARDUINOJSON_PRAGMA(GCC error msg)
|
||||||
|
|
||||||
|
#define ARDUINOJSON_STRINGIFY(S) #S
|
||||||
|
|
||||||
|
#define ARDUINOJSON_DEPRECATION_ERROR(X, Y) \
|
||||||
|
ARDUINOJSON_COMPILE_ERROR(ARDUINOJSON_STRINGIFY(X is a Y from ArduinoJson 6 but version 5 is installed. Visit arduinojson.org to get more information.))
|
||||||
|
|
||||||
|
#define StaticJsonDocument ARDUINOJSON_DEPRECATION_ERROR(StaticJsonDocument, class)
|
||||||
|
#define DynamicJsonDocument ARDUINOJSON_DEPRECATION_ERROR(DynamicJsonDocument, class)
|
||||||
|
#define JsonDocument ARDUINOJSON_DEPRECATION_ERROR(JsonDocument, class)
|
||||||
|
#define DeserializationError ARDUINOJSON_DEPRECATION_ERROR(DeserializationError, class)
|
||||||
|
#define deserializeJson ARDUINOJSON_DEPRECATION_ERROR(deserializeJson, function)
|
||||||
|
#define deserializeMsgPack ARDUINOJSON_DEPRECATION_ERROR(deserializeMsgPack, function)
|
||||||
|
#define serializeJson ARDUINOJSON_DEPRECATION_ERROR(serializeJson, function)
|
||||||
|
#define serializeMsgPack ARDUINOJSON_DEPRECATION_ERROR(serializeMsgPack, function)
|
||||||
|
#define serializeJsonPretty ARDUINOJSON_DEPRECATION_ERROR(serializeJsonPretty, function)
|
||||||
|
#define measureMsgPack ARDUINOJSON_DEPRECATION_ERROR(measureMsgPack, function)
|
||||||
|
#define measureJson ARDUINOJSON_DEPRECATION_ERROR(measureJson, function)
|
||||||
|
#define measureJsonPretty ARDUINOJSON_DEPRECATION_ERROR(measureJsonPretty, function)
|
||||||
|
|
||||||
|
#endif
|
@ -1,10 +1,10 @@
|
|||||||
// ArduinoJson - arduinojson.org
|
// ArduinoJson - arduinojson.org
|
||||||
// Copyright Benoit Blanchon 2014-2018
|
// Copyright Benoit Blanchon 2014-2019
|
||||||
// MIT License
|
// MIT License
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#define ARDUINOJSON_VERSION "5.13.4"
|
#define ARDUINOJSON_VERSION "5.13.5"
|
||||||
#define ARDUINOJSON_VERSION_MAJOR 5
|
#define ARDUINOJSON_VERSION_MAJOR 5
|
||||||
#define ARDUINOJSON_VERSION_MINOR 13
|
#define ARDUINOJSON_VERSION_MINOR 13
|
||||||
#define ARDUINOJSON_VERSION_REVISION 4
|
#define ARDUINOJSON_VERSION_REVISION 5
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user