Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
VariantContent.hpp
00001 // ArduinoJson - arduinojson.org 00002 // Copyright Benoit Blanchon 2014-2021 00003 // MIT License 00004 00005 #pragma once 00006 00007 #include <stddef.h> // size_t 00008 00009 #include <ArduinoJson/Collection/CollectionData.hpp> 00010 #include <ArduinoJson/Numbers/Float.hpp> 00011 #include <ArduinoJson/Numbers/Integer.hpp> 00012 00013 namespace ARDUINOJSON_NAMESPACE { 00014 00015 // 00016 enum { 00017 VALUE_MASK = 0x7F, 00018 00019 VALUE_IS_OWNED = 0x01, 00020 VALUE_IS_NULL = 0, 00021 VALUE_IS_LINKED_RAW = 0x02, 00022 VALUE_IS_OWNED_RAW = 0x03, 00023 VALUE_IS_LINKED_STRING = 0x04, 00024 VALUE_IS_OWNED_STRING = 0x05, 00025 00026 // CAUTION: no VALUE_IS_OWNED below 00027 VALUE_IS_BOOLEAN = 0x06, 00028 VALUE_IS_POSITIVE_INTEGER = 0x08, 00029 VALUE_IS_NEGATIVE_INTEGER = 0x0A, 00030 VALUE_IS_FLOAT = 0x0C, 00031 00032 COLLECTION_MASK = 0x60, 00033 VALUE_IS_OBJECT = 0x20, 00034 VALUE_IS_ARRAY = 0x40, 00035 00036 KEY_IS_OWNED = 0x80 00037 }; 00038 00039 struct RawData { 00040 const char *data; 00041 size_t size; 00042 }; 00043 00044 union VariantContent { 00045 Float asFloat; 00046 UInt asInteger; 00047 CollectionData asCollection; 00048 const char *asString; 00049 struct { 00050 const char *data; 00051 size_t size; 00052 } asRaw; 00053 }; 00054 } // namespace ARDUINOJSON_NAMESPACE
Generated on Wed Jul 13 2022 01:10:37 by
1.7.2