text
stringlengths
1
24.5M
// ArduinoJson - https://arduinojson.org // Copyright © 2014-2025, Benoit BLANCHON // MIT License #pragma once #include <ArduinoJson/Namespace.hpp> #include <ArduinoJson/Polyfills/assert.hpp> ARDUINOJSON_BEGIN_PUBLIC_NAMESPACE namespace DeserializationOption { class NestingLimit { public: NestingLimit() : value...
// ArduinoJson - https://arduinojson.org // Copyright © 2014-2025, Benoit BLANCHON // MIT License #pragma once #include <ArduinoJson/Namespace.hpp> #include <ArduinoJson/Polyfills/utility.hpp> #include <stdlib.h> // for size_t ARDUINOJSON_BEGIN_PRIVATE_NAMESPACE // The default reader is a simple wrapper for Read...
// ArduinoJson - https://arduinojson.org // Copyright © 2014-2025, Benoit BLANCHON // MIT License #pragma once #include <Arduino.h> ARDUINOJSON_BEGIN_PRIVATE_NAMESPACE template <typename TSource> struct Reader<TSource, enable_if_t<is_base_of<Stream, TSource>::value>> { public: explicit Reader(Stream& stream) : ...
// ArduinoJson - https://arduinojson.org // Copyright © 2014-2025, Benoit BLANCHON // MIT License #pragma once #include <Arduino.h> ARDUINOJSON_BEGIN_PRIVATE_NAMESPACE template <typename TSource> struct Reader<TSource, enable_if_t<is_base_of<::String, TSource>::value>> : BoundedReader<const char*> { explicit...
// ArduinoJson - https://arduinojson.org // Copyright © 2014-2025, Benoit BLANCHON // MIT License #pragma once #include <ArduinoJson/Polyfills/pgmspace.hpp> ARDUINOJSON_BEGIN_PRIVATE_NAMESPACE template <> struct Reader<const __FlashStringHelper*, void> { const char* ptr_; public: explicit Reader(const __Flas...
// ArduinoJson - https://arduinojson.org // Copyright © 2014-2025, Benoit BLANCHON // MIT License #pragma once #include <ArduinoJson/Polyfills/type_traits.hpp> ARDUINOJSON_BEGIN_PRIVATE_NAMESPACE template <typename TIterator> class IteratorReader { TIterator ptr_, end_; public: explicit IteratorReader(TItera...
// ArduinoJson - https://arduinojson.org // Copyright © 2014-2025, Benoit BLANCHON // MIT License #pragma once #include <ArduinoJson/Polyfills/type_traits.hpp> ARDUINOJSON_BEGIN_PRIVATE_NAMESPACE template <typename T> struct IsCharOrVoid { static const bool value = is_same<T, void>::value || is_same<T, cha...
// ArduinoJson - https://arduinojson.org // Copyright © 2014-2025, Benoit BLANCHON // MIT License #pragma once #include <istream> ARDUINOJSON_BEGIN_PRIVATE_NAMESPACE template <typename TSource> struct Reader<TSource, enable_if_t<is_base_of<std::istream, TSource>::value>> { public: explicit Reader(std::istream& ...
// ArduinoJson - https://arduinojson.org // Copyright © 2014-2025, Benoit BLANCHON // MIT License #pragma once #include <ArduinoJson/Object/MemberProxy.hpp> #include <ArduinoJson/Variant/JsonVariantConst.hpp> ARDUINOJSON_BEGIN_PRIVATE_NAMESPACE template <typename TVariant> struct Reader<TVariant, enable_if_t<IsVar...
// ArduinoJson - https://arduinojson.org // Copyright © 2014-2025, Benoit BLANCHON // MIT License #pragma once #include <ArduinoJson/Array/ElementProxy.hpp> #include <ArduinoJson/Memory/Allocator.hpp> #include <ArduinoJson/Memory/ResourceManager.hpp> #include <ArduinoJson/Object/JsonObject.hpp> #include <ArduinoJson...
// ArduinoJson - https://arduinojson.org // Copyright © 2014-2025, Benoit BLANCHON // MIT License #pragma once #include <ArduinoJson/Namespace.hpp> ARDUINOJSON_BEGIN_PRIVATE_NAMESPACE class EscapeSequence { public: // Optimized for code size on a 8-bit AVR static char escapeChar(char c) { const char* p = ...
// ArduinoJson - https://arduinojson.org // Copyright © 2014-2025, Benoit BLANCHON // MIT License #pragma once #include <ArduinoJson/Deserialization/deserialize.hpp> #include <ArduinoJson/Json/EscapeSequence.hpp> #include <ArduinoJson/Json/Latch.hpp> #include <ArduinoJson/Json/Utf16.hpp> #include <ArduinoJson/Json/U...
// ArduinoJson - https://arduinojson.org // Copyright © 2014-2025, Benoit BLANCHON // MIT License #pragma once #include <ArduinoJson/Json/TextFormatter.hpp> #include <ArduinoJson/Serialization/measure.hpp> #include <ArduinoJson/Serialization/serialize.hpp> #include <ArduinoJson/Variant/VariantDataVisitor.hpp> ARDUI...
// ArduinoJson - https://arduinojson.org // Copyright © 2014-2025, Benoit BLANCHON // MIT License #pragma once #include <ArduinoJson/Polyfills/assert.hpp> ARDUINOJSON_BEGIN_PRIVATE_NAMESPACE template <typename TReader> class Latch { public: Latch(TReader reader) : reader_(reader), loaded_(false) { #if ARDUINOJS...
// ArduinoJson - https://arduinojson.org // Copyright © 2014-2025, Benoit BLANCHON // MIT License #pragma once #include <ArduinoJson/Configuration.hpp> #include <ArduinoJson/Json/JsonSerializer.hpp> #include <ArduinoJson/Serialization/measure.hpp> #include <ArduinoJson/Serialization/serialize.hpp> ARDUINOJSON_BEGIN...
// ArduinoJson - https://arduinojson.org // Copyright © 2014-2025, Benoit BLANCHON // MIT License #pragma once #include <stdint.h> #include <string.h> // for strlen #include <ArduinoJson/Json/EscapeSequence.hpp> #include <ArduinoJson/Numbers/FloatParts.hpp> #include <ArduinoJson/Numbers/JsonInteger.hpp> #include <...
// ArduinoJson - https://arduinojson.org // Copyright © 2014-2025, Benoit BLANCHON // MIT License #pragma once #include <ArduinoJson/Namespace.hpp> #include <stdint.h> // uint16_t, uint32_t // The high surrogate may be uninitialized if the pair is invalid, // we choose to ignore the problem to reduce the size of ...
// ArduinoJson - https://arduinojson.org // Copyright © 2014-2025, Benoit BLANCHON // MIT License #pragma once #include <ArduinoJson/Namespace.hpp> ARDUINOJSON_BEGIN_PRIVATE_NAMESPACE namespace Utf8 { template <typename TStringBuilder> inline void encodeCodepoint(uint32_t codepoint32, TStringBuilder& str) { // t...
// ArduinoJson - https://arduinojson.org // Copyright © 2014-2025, Benoit BLANCHON // MIT License #pragma once #include <ArduinoJson/Namespace.hpp> #include <stddef.h> // size_t ARDUINOJSON_BEGIN_PRIVATE_NAMESPACE #if ARDUINOJSON_ENABLE_ALIGNMENT inline bool isAligned(size_t value) { const size_t mask = sizeo...
// ArduinoJson - https://arduinojson.org // Copyright © 2014-2025, Benoit BLANCHON // MIT License #pragma once #include <ArduinoJson/Namespace.hpp> #include <stdlib.h> // malloc, free ARDUINOJSON_BEGIN_PUBLIC_NAMESPACE class Allocator { public: virtual void* allocate(size_t size) = 0; virtual void deallocat...
// ArduinoJson - https://arduinojson.org // Copyright © 2014-2025, Benoit BLANCHON // MIT License #pragma once #include <ArduinoJson/Memory/Allocator.hpp> #include <ArduinoJson/Polyfills/assert.hpp> #include <ArduinoJson/Polyfills/integer.hpp> ARDUINOJSON_BEGIN_PRIVATE_NAMESPACE using SlotId = uint_t<ARDUINOJSON_S...
// ArduinoJson - https://arduinojson.org // Copyright © 2014-2025, Benoit BLANCHON // MIT License #pragma once #include <ArduinoJson/Memory/MemoryPool.hpp> #include <ArduinoJson/Polyfills/assert.hpp> #include <ArduinoJson/Polyfills/utility.hpp> #include <string.h> // memcpy ARDUINOJSON_BEGIN_PRIVATE_NAMESPACE us...
// ArduinoJson - https://arduinojson.org // Copyright © 2014-2025, Benoit BLANCHON // MIT License #pragma once #include <ArduinoJson/Memory/Allocator.hpp> #include <ArduinoJson/Memory/MemoryPoolList.hpp> #include <ArduinoJson/Memory/StringPool.hpp> #include <ArduinoJson/Polyfills/assert.hpp> #include <ArduinoJson/Po...
// ArduinoJson - https://arduinojson.org // Copyright © 2014-2025, Benoit BLANCHON // MIT License #pragma once #include <ArduinoJson/Memory/ResourceManager.hpp> #include <ArduinoJson/Strings/JsonString.hpp> ARDUINOJSON_BEGIN_PRIVATE_NAMESPACE class StringBuffer { public: StringBuffer(ResourceManager* resources)...
// ArduinoJson - https://arduinojson.org // Copyright © 2014-2025, Benoit BLANCHON // MIT License #pragma once #include <ArduinoJson/Memory/ResourceManager.hpp> #include <ArduinoJson/Strings/JsonString.hpp> ARDUINOJSON_BEGIN_PRIVATE_NAMESPACE class StringBuilder { public: static const size_t initialCapacity = 3...
// ArduinoJson - https://arduinojson.org // Copyright © 2014-2025, Benoit BLANCHON // MIT License #pragma once #include <ArduinoJson/Memory/Allocator.hpp> #include <ArduinoJson/Namespace.hpp> #include <ArduinoJson/Polyfills/assert.hpp> #include <ArduinoJson/Polyfills/integer.hpp> #include <ArduinoJson/Polyfills/limi...
// ArduinoJson - https://arduinojson.org // Copyright © 2014-2025, Benoit BLANCHON // MIT License #pragma once #include <ArduinoJson/Memory/Allocator.hpp> #include <ArduinoJson/Memory/StringNode.hpp> #include <ArduinoJson/Polyfills/assert.hpp> #include <ArduinoJson/Polyfills/utility.hpp> #include <ArduinoJson/String...
// ArduinoJson - https://arduinojson.org // Copyright © 2014-2025, Benoit BLANCHON // MIT License #pragma once #include <ArduinoJson/Strings/StringAdapters.hpp> ARDUINOJSON_BEGIN_PUBLIC_NAMESPACE // A special type of data that can be used to insert pregenerated JSON portions. template <typename T> class Serialized...
// ArduinoJson - https://arduinojson.org // Copyright © 2014-2025, Benoit BLANCHON // MIT License #pragma once #include <ArduinoJson/Polyfills/type_traits.hpp> ARDUINOJSON_BEGIN_PRIVATE_NAMESPACE #if ARDUINOJSON_LITTLE_ENDIAN inline void swapBytes(uint8_t& a, uint8_t& b) { uint8_t t(a); a = b; b = t; } inli...
// ArduinoJson - https://arduinojson.org // Copyright © 2014-2025, Benoit BLANCHON // MIT License #pragma once #include <ArduinoJson/Namespace.hpp> ARDUINOJSON_BEGIN_PRIVATE_NAMESPACE inline void doubleToFloat(const uint8_t d[8], uint8_t f[4]) { f[0] = uint8_t((d[0] & 0xC0) | (d[0] << 3 & 0x3f) | (d[1] >> 5)); ...
#pragma once #include <ArduinoJson/Variant/Converter.hpp> ARDUINOJSON_BEGIN_PUBLIC_NAMESPACE class MsgPackBinary { public: MsgPackBinary() : data_(nullptr), size_(0) {} explicit MsgPackBinary(const void* c, size_t size) : data_(c), size_(size) {} const void* data() const { return data_; } size_t siz...
// ArduinoJson - https://arduinojson.org // Copyright © 2014-2025, Benoit BLANCHON // MIT License #pragma once #include <ArduinoJson/Deserialization/deserialize.hpp> #include <ArduinoJson/Memory/ResourceManager.hpp> #include <ArduinoJson/Memory/StringBuffer.hpp> #include <ArduinoJson/MsgPack/endianness.hpp> #include...
#pragma once #include <ArduinoJson/Variant/Converter.hpp> ARDUINOJSON_BEGIN_PUBLIC_NAMESPACE class MsgPackExtension { public: MsgPackExtension() : data_(nullptr), size_(0), type_(0) {} explicit MsgPackExtension(int8_t type, const void* data, size_t size) : data_(data), size_(size), type_(type) {} int8_...
// ArduinoJson - https://arduinojson.org // Copyright © 2014-2025, Benoit BLANCHON // MIT License #pragma once #include <ArduinoJson/MsgPack/endianness.hpp> #include <ArduinoJson/Polyfills/assert.hpp> #include <ArduinoJson/Polyfills/type_traits.hpp> #include <ArduinoJson/Serialization/CountingDecorator.hpp> #include...
// ArduinoJson - https://arduinojson.org // Copyright © 2014-2025, Benoit BLANCHON // MIT License #pragma once #include <ArduinoJson/Numbers/JsonInteger.hpp> #include <ArduinoJson/Polyfills/type_traits.hpp> ARDUINOJSON_BEGIN_PRIVATE_NAMESPACE enum CompareResult { COMPARE_RESULT_DIFFER = 0, COMPARE_RESULT_EQUAL...
// ArduinoJson - https://arduinojson.org // Copyright © 2014-2025, Benoit BLANCHON // MIT License #pragma once #if defined(__clang__) # pragma clang diagnostic push # pragma clang diagnostic ignored "-Wconversion" #elif defined(__GNUC__) # pragma GCC diagnostic push # pragma GCC diagnostic ignored "-Wconversion"...
// ArduinoJson - https://arduinojson.org // Copyright © 2014-2025, Benoit BLANCHON // MIT License #pragma once #include <ArduinoJson/Configuration.hpp> #include <ArduinoJson/Numbers/FloatTraits.hpp> #include <ArduinoJson/Numbers/JsonFloat.hpp> #include <ArduinoJson/Polyfills/math.hpp> ARDUINOJSON_BEGIN_PRIVATE_NAME...
// ArduinoJson - https://arduinojson.org // Copyright © 2014-2025, Benoit BLANCHON // MIT License #pragma once #include <stddef.h> // for size_t #include <stdint.h> #include <ArduinoJson/Configuration.hpp> #include <ArduinoJson/Polyfills/alias_cast.hpp> #include <ArduinoJson/Polyfills/math.hpp> #include <ArduinoJs...
// ArduinoJson - https://arduinojson.org // Copyright © 2014-2025, Benoit BLANCHON // MIT License #pragma once #include <ArduinoJson/Configuration.hpp> #include <ArduinoJson/Namespace.hpp> ARDUINOJSON_BEGIN_PUBLIC_NAMESPACE #if ARDUINOJSON_USE_DOUBLE using JsonFloat = double; #else using JsonFloat = float; #endif ...
// ArduinoJson - https://arduinojson.org // Copyright © 2014-2025, Benoit BLANCHON // MIT License #pragma once #include <ArduinoJson/Configuration.hpp> #include <ArduinoJson/Namespace.hpp> #include <stdint.h> // int64_t ARDUINOJSON_BEGIN_PUBLIC_NAMESPACE #if ARDUINOJSON_USE_LONG_LONG using JsonInteger = int64_t;...
// ArduinoJson - https://arduinojson.org // Copyright © 2014-2025, Benoit BLANCHON // MIT License #pragma once #include <ArduinoJson/Numbers/FloatTraits.hpp> #include <ArduinoJson/Numbers/JsonFloat.hpp> #include <ArduinoJson/Numbers/convertNumber.hpp> #include <ArduinoJson/Polyfills/assert.hpp> #include <ArduinoJson...
// ArduinoJson - https://arduinojson.org // Copyright © 2014-2025, Benoit BLANCHON // MIT License #pragma once #include <ArduinoJson/Object/JsonObjectConst.hpp> #include <ArduinoJson/Object/MemberProxy.hpp> ARDUINOJSON_BEGIN_PUBLIC_NAMESPACE class JsonArray; // A reference to an object in a JsonDocument. // https...
// ArduinoJson - https://arduinojson.org // Copyright © 2014-2025, Benoit BLANCHON // MIT License #pragma once #include <ArduinoJson/Object/JsonObjectIterator.hpp> #include <ArduinoJson/Variant/VariantOperators.hpp> ARDUINOJSON_BEGIN_PUBLIC_NAMESPACE // A read-only reference to an object in a JsonDocument. // http...
// ArduinoJson - https://arduinojson.org // Copyright © 2014-2025, Benoit BLANCHON // MIT License #pragma once #include <ArduinoJson/Object/JsonPair.hpp> ARDUINOJSON_BEGIN_PUBLIC_NAMESPACE class JsonObjectIterator { friend class JsonObject; public: JsonObjectIterator() {} explicit JsonObjectIterator(detai...
// ArduinoJson - https://arduinojson.org // Copyright © 2014-2025, Benoit BLANCHON // MIT License #pragma once #include <ArduinoJson/Strings/JsonString.hpp> #include <ArduinoJson/Variant/JsonVariant.hpp> #include <ArduinoJson/Variant/JsonVariantConst.hpp> ARDUINOJSON_BEGIN_PUBLIC_NAMESPACE // A key-value pair. // ...
// ArduinoJson - https://arduinojson.org // Copyright © 2014-2025, Benoit BLANCHON // MIT License #pragma once #include <ArduinoJson/Variant/VariantRefBase.hpp> ARDUINOJSON_BEGIN_PRIVATE_NAMESPACE // A proxy class to get or set a member of an object. // https://arduinojson.org/v7/api/jsonobject/subscript/ template...
// ArduinoJson - https://arduinojson.org // Copyright © 2014-2025, Benoit BLANCHON // MIT License #pragma once #include <ArduinoJson/Variant/VariantCompare.hpp> #include <ArduinoJson/Variant/VariantImpl.hpp> ARDUINOJSON_BEGIN_PRIVATE_NAMESPACE template <typename TAdaptedString> inline VariantData* VariantImpl::get...
// ArduinoJson - https://arduinojson.org // Copyright © 2014-2025, Benoit BLANCHON // MIT License #pragma once #include <stdint.h> #include <stdlib.h> // for size_t #include <ArduinoJson/Configuration.hpp> #include "math.hpp" ARDUINOJSON_BEGIN_PRIVATE_NAMESPACE template <typename T, typename F> struct alias_cast...
// ArduinoJson - https://arduinojson.org // Copyright © 2014-2025, Benoit BLANCHON // MIT License #pragma once #include <ArduinoJson/Configuration.hpp> #if ARDUINOJSON_DEBUG # include <assert.h> # define ARDUINOJSON_ASSERT(X) assert(X) #else # define ARDUINOJSON_ASSERT(X) ((void)0) #endif
// ArduinoJson - https://arduinojson.org // Copyright © 2014-2025, Benoit BLANCHON // MIT License #pragma once #ifdef _MSC_VER // Visual Studio # define FORCE_INLINE // __forceinline causes C4714 when returning std::string # ifndef ARDUINOJSON_DEPRECATED # define ARDUINOJSON_DEPRECATED(msg) __declspec(depre...
// ArduinoJson - https://arduinojson.org // Copyright © 2014-2025, Benoit BLANCHON // MIT License #pragma once #include <ArduinoJson/Namespace.hpp> ARDUINOJSON_BEGIN_PRIVATE_NAMESPACE #ifndef isdigit inline bool isdigit(char c) { return '0' <= c && c <= '9'; } #endif inline bool issign(char c) { return '-' ==...
// ArduinoJson - https://arduinojson.org // Copyright © 2014-2025, Benoit BLANCHON // MIT License #pragma once #include <stdint.h> // int8_t, int16_t #include <ArduinoJson/Namespace.hpp> ARDUINOJSON_BEGIN_PRIVATE_NAMESPACE template <int Bits> struct uint_; template <> struct uint_<8> { using type = uint8_t; }...
// ArduinoJson - https://arduinojson.org // Copyright © 2014-2025, Benoit BLANCHON // MIT License #pragma once #include "type_traits.hpp" #ifdef _MSC_VER # pragma warning(push) # pragma warning(disable : 4310) #endif ARDUINOJSON_BEGIN_PRIVATE_NAMESPACE // Differs from standard because we can't use the symbols "...
// ArduinoJson - https://arduinojson.org // Copyright © 2014-2025, Benoit BLANCHON // MIT License #pragma once #include <ArduinoJson/Namespace.hpp> ARDUINOJSON_BEGIN_PRIVATE_NAMESPACE // Some libraries #define isnan() and isinf() so we need to check before // using this name #ifndef isnan template <typename T> bo...
// ArduinoJson - https://arduinojson.org // Copyright © 2014-2025, Benoit BLANCHON // MIT License #pragma once #ifdef ARDUINO # include <Arduino.h> #else // Allow using PROGMEM outside of Arduino (issue #1903) class __FlashStringHelper; # include <avr/pgmspace.h> #endif #include <ArduinoJson/Configuration.hpp> #i...
// ArduinoJson - https://arduinojson.org // Copyright © 2014-2025, Benoit BLANCHON // MIT License #pragma once #include <ArduinoJson/Namespace.hpp> #if ARDUINOJSON_ENABLE_PROGMEM # include <ArduinoJson/Polyfills/pgmspace.hpp> # include <ArduinoJson/Polyfills/type_traits.hpp> #endif ARDUINOJSON_BEGIN_PRIVATE_NAME...
// ArduinoJson - https://arduinojson.org // Copyright © 2014-2025, Benoit BLANCHON // MIT License #pragma once #define ARDUINOJSON_CONCAT_(A, B) A##B #define ARDUINOJSON_CONCAT2(A, B) ARDUINOJSON_CONCAT_(A, B) #define ARDUINOJSON_CONCAT3(A, B, C) \ ARDUINOJSON_CONCAT2(ARDUINOJSON_CONCAT2(A, B), C) #define ARDUINOJ...
// ArduinoJson - https://arduinojson.org // Copyright © 2014-2025, Benoit BLANCHON // MIT License #pragma once #include "type_traits/conditional.hpp" #include "type_traits/decay.hpp" #include "type_traits/enable_if.hpp" #include "type_traits/function_traits.hpp" #include "type_traits/integral_constant.hpp" #include ...
// ArduinoJson - https://arduinojson.org // Copyright © 2014-2025, Benoit BLANCHON // MIT License #pragma once #include "type_traits.hpp" ARDUINOJSON_BEGIN_PRIVATE_NAMESPACE using nullptr_t = decltype(nullptr); template <class T> T&& forward(remove_reference_t<T>& t) noexcept { return static_cast<T&&>(t); } te...
// ArduinoJson - https://arduinojson.org // Copyright © 2014-2025, Benoit BLANCHON // MIT License #pragma once #include <ArduinoJson/Namespace.hpp> #include <stddef.h> // for size_t ARDUINOJSON_BEGIN_PRIVATE_NAMESPACE // A meta-function that returns the highest value template <size_t X, size_t Y, bool MaxIsX = (...
// ArduinoJson - https://arduinojson.org // Copyright © 2014-2025, Benoit BLANCHON // MIT License #pragma once #include <ArduinoJson/Namespace.hpp> ARDUINOJSON_BEGIN_PRIVATE_NAMESPACE template <bool Condition, class TrueType, class FalseType> struct conditional { using type = TrueType; }; template <class TrueTy...
// ArduinoJson - https://arduinojson.org // Copyright © 2014-2025, Benoit BLANCHON // MIT License #pragma once #include <stddef.h> // size_t #include <ArduinoJson/Namespace.hpp> ARDUINOJSON_BEGIN_PRIVATE_NAMESPACE template <typename T> struct decay { using type = T; }; template <typename T> struct decay<T&> :...
// ArduinoJson - https://arduinojson.org // Copyright © 2014-2025, Benoit BLANCHON // MIT License #pragma once #include <ArduinoJson/Namespace.hpp> ARDUINOJSON_BEGIN_PRIVATE_NAMESPACE template <typename T> T&& declval(); ARDUINOJSON_END_PRIVATE_NAMESPACE
// ArduinoJson - https://arduinojson.org // Copyright © 2014-2025, Benoit BLANCHON // MIT License #pragma once #include <ArduinoJson/Namespace.hpp> ARDUINOJSON_BEGIN_PRIVATE_NAMESPACE // A meta-function that return the type T if Condition is true. template <bool Condition, typename T = void> struct enable_if {}; ...
// ArduinoJson - https://arduinojson.org // Copyright © 2014-2025, Benoit BLANCHON // MIT License #pragma once #include <ArduinoJson/Namespace.hpp> ARDUINOJSON_BEGIN_PRIVATE_NAMESPACE template <typename Sig> struct function_traits; template <typename ReturnType, typename Arg1> struct function_traits<ReturnType (*...
// ArduinoJson - https://arduinojson.org // Copyright © 2014-2025, Benoit BLANCHON // MIT License #pragma once #include <ArduinoJson/Namespace.hpp> ARDUINOJSON_BEGIN_PRIVATE_NAMESPACE template <typename T, T v> struct integral_constant { static const T value = v; }; template <bool B> using bool_constant = integ...
// ArduinoJson - https://arduinojson.org // Copyright © 2014-2025, Benoit BLANCHON // MIT License #pragma once #include <ArduinoJson/Namespace.hpp> #include <stddef.h> // size_t ARDUINOJSON_BEGIN_PRIVATE_NAMESPACE template <typename T> struct is_array : false_type {}; template <typename T> struct is_array<T[]> ...
// ArduinoJson - https://arduinojson.org // Copyright © 2014-2025, Benoit BLANCHON // MIT License #pragma once #include <ArduinoJson/Namespace.hpp> #include "remove_reference.hpp" ARDUINOJSON_BEGIN_PRIVATE_NAMESPACE // A meta-function that returns true if Derived inherits from TBase is an // integral type. templa...
// ArduinoJson - https://arduinojson.org // Copyright © 2014-2025, Benoit BLANCHON // MIT License #pragma once #include "declval.hpp" ARDUINOJSON_BEGIN_PRIVATE_NAMESPACE template <typename T> struct is_class { protected: // <- to avoid GCC's "all member functions in class are private" template <typename U> s...
// ArduinoJson - https://arduinojson.org // Copyright © 2014-2025, Benoit BLANCHON // MIT License #pragma once #include "integral_constant.hpp" ARDUINOJSON_BEGIN_PRIVATE_NAMESPACE // A meta-function that return the type T without the const modifier template <typename T> struct is_const : false_type {}; template <...
// ArduinoJson - https://arduinojson.org // Copyright © 2014-2025, Benoit BLANCHON // MIT License #pragma once #include "declval.hpp" #ifdef _MSC_VER # pragma warning(push) // conversion from 'T' to 'To', possible loss of data # pragma warning(disable : 4244) #endif // clang-format off #ifdef __ICCARM__ // Suppr...
// ArduinoJson - https://arduinojson.org // Copyright © 2014-2025, Benoit BLANCHON // MIT License #pragma once #include "is_class.hpp" #include "is_convertible.hpp" #include "is_floating_point.hpp" #include "is_integral.hpp" #include "is_same.hpp" ARDUINOJSON_BEGIN_PRIVATE_NAMESPACE template <typename T> struct is...
// ArduinoJson - https://arduinojson.org // Copyright © 2014-2025, Benoit BLANCHON // MIT License #pragma once #include "integral_constant.hpp" #include "is_same.hpp" #include "remove_cv.hpp" ARDUINOJSON_BEGIN_PRIVATE_NAMESPACE template <class T> struct is_floating_point : integral_constant<bool, // ...
// ArduinoJson - https://arduinojson.org // Copyright © 2014-2025, Benoit BLANCHON // MIT License #pragma once #include <ArduinoJson/Configuration.hpp> #include "integral_constant.hpp" #include "is_same.hpp" #include "remove_cv.hpp" ARDUINOJSON_BEGIN_PRIVATE_NAMESPACE // clang-format off template <typename T> str...
// ArduinoJson - https://arduinojson.org // Copyright © 2014-2025, Benoit BLANCHON // MIT License #pragma once #include "integral_constant.hpp" ARDUINOJSON_BEGIN_PRIVATE_NAMESPACE template <typename T> struct is_pointer : false_type {}; template <typename T> struct is_pointer<T*> : true_type {}; ARDUINOJSON_END_...
// ArduinoJson - https://arduinojson.org // Copyright © 2014-2025, Benoit BLANCHON // MIT License #pragma once #include "integral_constant.hpp" ARDUINOJSON_BEGIN_PRIVATE_NAMESPACE // A meta-function that returns true if types T and U are the same. template <typename T, typename U> struct is_same : false_type {}; ...
// ArduinoJson - https://arduinojson.org // Copyright © 2014-2025, Benoit BLANCHON // MIT License #pragma once #include "integral_constant.hpp" #include "is_same.hpp" #include "remove_cv.hpp" ARDUINOJSON_BEGIN_PRIVATE_NAMESPACE // clang-format off template <typename T> struct is_signed : integral_constant<bool, ...
// ArduinoJson - https://arduinojson.org // Copyright © 2014-2025, Benoit BLANCHON // MIT License #pragma once #include "integral_constant.hpp" #include "is_same.hpp" #include "remove_cv.hpp" ARDUINOJSON_BEGIN_PRIVATE_NAMESPACE // clang-format off template <typename T> struct is_unsigned : integral_constant<bool, ...
// ArduinoJson - https://arduinojson.org // Copyright © 2014-2025, Benoit BLANCHON // MIT License #pragma once #include "type_identity.hpp" ARDUINOJSON_BEGIN_PRIVATE_NAMESPACE template <typename T> struct make_unsigned; template <> struct make_unsigned<char> : type_identity<unsigned char> {}; template <> struct m...
// ArduinoJson - https://arduinojson.org // Copyright © 2014-2025, Benoit BLANCHON // MIT License #pragma once #include <ArduinoJson/Namespace.hpp> ARDUINOJSON_BEGIN_PRIVATE_NAMESPACE // A meta-function that return the type T without the const modifier template <typename T> struct remove_const { using type = T; ...
// ArduinoJson - https://arduinojson.org // Copyright © 2014-2025, Benoit BLANCHON // MIT License #pragma once #include <ArduinoJson/Namespace.hpp> ARDUINOJSON_BEGIN_PRIVATE_NAMESPACE template <typename T> struct remove_cv { using type = T; }; template <typename T> struct remove_cv<const T> { using type = T; }...
// ArduinoJson - https://arduinojson.org // Copyright © 2014-2025, Benoit BLANCHON // MIT License #pragma once #include <ArduinoJson/Namespace.hpp> ARDUINOJSON_BEGIN_PRIVATE_NAMESPACE // A meta-function that return the type T without the reference modifier. template <typename T> struct remove_reference { using t...
// ArduinoJson - https://arduinojson.org // Copyright © 2014-2025, Benoit BLANCHON // MIT License #pragma once #include "integral_constant.hpp" ARDUINOJSON_BEGIN_PRIVATE_NAMESPACE template <typename T> struct type_identity { using type = T; }; ARDUINOJSON_END_PRIVATE_NAMESPACE
// ArduinoJson - https://arduinojson.org // Copyright © 2014-2025, Benoit BLANCHON // MIT License #pragma once #include <ArduinoJson/Namespace.hpp> ARDUINOJSON_BEGIN_PRIVATE_NAMESPACE template <typename...> struct make_void { using type = void; }; template <typename... Args> using void_t = typename make_void<Ar...
// ArduinoJson - https://arduinojson.org // Copyright © 2014-2025, Benoit BLANCHON // MIT License #pragma once #include <ArduinoJson/Namespace.hpp> ARDUINOJSON_BEGIN_PRIVATE_NAMESPACE template <typename TWriter> class CountingDecorator { public: explicit CountingDecorator(TWriter& writer) : writer_(writer), cou...
// ArduinoJson - https://arduinojson.org // Copyright © 2014-2025, Benoit BLANCHON // MIT License #pragma once #include <ArduinoJson/Serialization/Writers/DummyWriter.hpp> ARDUINOJSON_BEGIN_PRIVATE_NAMESPACE template <template <typename> class TSerializer> size_t measure(ArduinoJson::JsonVariantConst source) { D...
// ArduinoJson - https://arduinojson.org // Copyright © 2014-2025, Benoit BLANCHON // MIT License #pragma once #include <ArduinoJson/Serialization/Writer.hpp> ARDUINOJSON_BEGIN_PRIVATE_NAMESPACE template <template <typename> class TSerializer, typename TWriter> size_t doSerialize(ArduinoJson::JsonVariantConst sour...
// ArduinoJson - https://arduinojson.org // Copyright © 2014-2025, Benoit BLANCHON // MIT License #pragma once #include <ArduinoJson/Namespace.hpp> ARDUINOJSON_BEGIN_PRIVATE_NAMESPACE // The default writer is a simple wrapper for Writers that are not copyable template <typename TDestination, typename Enable = void...
// ArduinoJson - https://arduinojson.org // Copyright © 2014-2025, Benoit BLANCHON // MIT License #pragma once #include <Arduino.h> ARDUINOJSON_BEGIN_PRIVATE_NAMESPACE template <> class Writer<::String, void> { static const size_t bufferCapacity = ARDUINOJSON_STRING_BUFFER_SIZE; public: explicit Writer(::Str...
// ArduinoJson - https://arduinojson.org // Copyright © 2014-2025, Benoit BLANCHON // MIT License #pragma once #include <ArduinoJson/Namespace.hpp> ARDUINOJSON_BEGIN_PRIVATE_NAMESPACE class DummyWriter { public: size_t write(uint8_t) { return 1; } size_t write(const uint8_t*, size_t n) { return n; ...
// ArduinoJson - https://arduinojson.org // Copyright © 2014-2025, Benoit BLANCHON // MIT License #pragma once #include <Arduino.h> ARDUINOJSON_BEGIN_PRIVATE_NAMESPACE template <typename TDestination> class Writer<TDestination, enable_if_t<is_base_of<::Print, TDestination>::value>> { public: explic...
// ArduinoJson - https://arduinojson.org // Copyright © 2014-2025, Benoit BLANCHON // MIT License #pragma once #include <ArduinoJson/Namespace.hpp> ARDUINOJSON_BEGIN_PRIVATE_NAMESPACE class StaticStringWriter { public: StaticStringWriter(char* buf, size_t size) : end(buf + size), p(buf) {} size_t write(uint8...
// ArduinoJson - https://arduinojson.org // Copyright © 2014-2025, Benoit BLANCHON // MIT License #pragma once #include <ostream> ARDUINOJSON_BEGIN_PRIVATE_NAMESPACE template <typename TDestination> class Writer<TDestination, enable_if_t<is_base_of<std::ostream, TDestination>::value>> { public: exp...
// ArduinoJson - https://arduinojson.org // Copyright © 2014-2025, Benoit BLANCHON // MIT License #pragma once #include <ArduinoJson/Namespace.hpp> #include <ArduinoJson/Polyfills/type_traits.hpp> ARDUINOJSON_BEGIN_PRIVATE_NAMESPACE template <class T, typename = void> struct is_std_string : false_type {}; templat...
// ArduinoJson - https://arduinojson.org // Copyright © 2014-2025, Benoit BLANCHON // MIT License #pragma once #include <ArduinoJson/Polyfills/type_traits.hpp> #include <ArduinoJson/Strings/StringAdapter.hpp> ARDUINOJSON_BEGIN_PRIVATE_NAMESPACE template <typename T, typename Enable = void> struct IsString : false_...
// ArduinoJson - https://arduinojson.org // Copyright © 2014-2025, Benoit BLANCHON // MIT License #pragma once #include <ArduinoJson/Polyfills/type_traits.hpp> #include <ArduinoJson/Strings/Adapters/RamString.hpp> #if ARDUINOJSON_ENABLE_STD_STREAM # include <ostream> #endif ARDUINOJSON_BEGIN_PUBLIC_NAMESPACE // ...
// ArduinoJson - https://arduinojson.org // Copyright © 2014-2025, Benoit BLANCHON // MIT License #pragma once #include <ArduinoJson/Polyfills/utility.hpp> ARDUINOJSON_BEGIN_PRIVATE_NAMESPACE template <typename TString, typename Enable = void> struct StringAdapter; template <typename TString, typename Enable = vo...
// ArduinoJson - https://arduinojson.org // Copyright © 2014-2025, Benoit BLANCHON // MIT License #pragma once #include <ArduinoJson/Polyfills/type_traits.hpp> #include <ArduinoJson/Strings/Adapters/RamString.hpp> #include <ArduinoJson/Strings/Adapters/StringObject.hpp> #if ARDUINOJSON_ENABLE_PROGMEM # include <Ar...
// ArduinoJson - https://arduinojson.org // Copyright © 2014-2025, Benoit BLANCHON // MIT License #pragma once #include <ArduinoJson/Strings/Adapters/RamString.hpp> #include <ArduinoJson/Strings/StringAdapter.hpp> ARDUINOJSON_BEGIN_PRIVATE_NAMESPACE namespace string_traits_impl { // const char* c_str() const // -...
// ArduinoJson - https://arduinojson.org // Copyright © 2014-2025, Benoit BLANCHON // MIT License #pragma once #include <ArduinoJson/Polyfills/pgmspace.hpp> #include <ArduinoJson/Strings/StringAdapter.hpp> ARDUINOJSON_BEGIN_PRIVATE_NAMESPACE class FlashString { public: static const size_t typeSortKey = 1; Fl...