|
5 | 5 | #pragma once |
6 | 6 |
|
7 | 7 | // Support std::istream and std::ostream |
| 8 | +// https://arduinojson.org/v7/config/enable_std_stream/ |
8 | 9 | #ifndef ARDUINOJSON_ENABLE_STD_STREAM |
9 | 10 | # ifdef __has_include |
10 | 11 | # if __has_include(<istream>) && \ |
|
25 | 26 | #endif |
26 | 27 |
|
27 | 28 | // Support std::string |
| 29 | +// https://arduinojson.org/v7/config/enable_std_string/ |
28 | 30 | #ifndef ARDUINOJSON_ENABLE_STD_STRING |
29 | 31 | # ifdef __has_include |
30 | 32 | # if __has_include(<string>) && !defined(min) && !defined(max) |
|
55 | 57 | #endif |
56 | 58 |
|
57 | 59 | // Store floating-point values with float (0) or double (1) |
| 60 | +// https://arduinojson.org/v7/config/use_double/ |
58 | 61 | #ifndef ARDUINOJSON_USE_DOUBLE |
59 | 62 | # define ARDUINOJSON_USE_DOUBLE 1 |
60 | 63 | #endif |
|
71 | 74 | #endif |
72 | 75 |
|
73 | 76 | // Store integral values with long (0) or long long (1) |
| 77 | +// https://arduinojson.org/v7/config/use_long_long/ |
74 | 78 | #ifndef ARDUINOJSON_USE_LONG_LONG |
75 | 79 | # if ARDUINOJSON_SIZEOF_POINTER >= 4 // 32 & 64 bits systems |
76 | 80 | # define ARDUINOJSON_USE_LONG_LONG 1 |
|
80 | 84 | #endif |
81 | 85 |
|
82 | 86 | // Limit nesting as the stack is likely to be small |
| 87 | +// https://arduinojson.org/v7/config/default_nesting_limit/ |
83 | 88 | #ifndef ARDUINOJSON_DEFAULT_NESTING_LIMIT |
84 | 89 | # define ARDUINOJSON_DEFAULT_NESTING_LIMIT 10 |
85 | 90 | #endif |
86 | 91 |
|
87 | | -// Number of bytes to store the variant identifier |
| 92 | +// Number of bytes to store a slot id |
| 93 | +// https://arduinojson.org/v7/config/slot_id_size/ |
88 | 94 | #ifndef ARDUINOJSON_SLOT_ID_SIZE |
89 | 95 | # if ARDUINOJSON_SIZEOF_POINTER <= 2 |
90 | 96 | # define ARDUINOJSON_SLOT_ID_SIZE 1 // up to 255 slots |
|
123 | 129 | #endif |
124 | 130 |
|
125 | 131 | // Number of bytes to store the length of a string |
| 132 | +// https://arduinojson.org/v7/config/string_length_size/ |
126 | 133 | #ifndef ARDUINOJSON_STRING_LENGTH_SIZE |
127 | 134 | # if ARDUINOJSON_SIZEOF_POINTER <= 2 |
128 | 135 | # define ARDUINOJSON_STRING_LENGTH_SIZE 1 // up to 255 characters |
|
134 | 141 | #ifdef ARDUINO |
135 | 142 |
|
136 | 143 | // Enable support for Arduino's String class |
| 144 | +// https://arduinojson.org/v7/config/enable_arduino_string/ |
137 | 145 | # ifndef ARDUINOJSON_ENABLE_ARDUINO_STRING |
138 | 146 | # define ARDUINOJSON_ENABLE_ARDUINO_STRING 1 |
139 | 147 | # endif |
140 | 148 |
|
141 | 149 | // Enable support for Arduino's Stream class |
| 150 | +// https://arduinojson.org/v7/config/enable_arduino_stream/ |
142 | 151 | # ifndef ARDUINOJSON_ENABLE_ARDUINO_STREAM |
143 | 152 | # define ARDUINOJSON_ENABLE_ARDUINO_STREAM 1 |
144 | 153 | # endif |
|
149 | 158 | # endif |
150 | 159 |
|
151 | 160 | // Enable support for PROGMEM |
| 161 | +// https://arduinojson.org/v7/config/enable_progmem/ |
152 | 162 | # ifndef ARDUINOJSON_ENABLE_PROGMEM |
153 | 163 | # define ARDUINOJSON_ENABLE_PROGMEM 1 |
154 | 164 | # endif |
155 | 165 |
|
156 | 166 | #else // ARDUINO |
157 | 167 |
|
158 | 168 | // Disable support for Arduino's String class |
| 169 | +// https://arduinojson.org/v7/config/enable_arduino_string/ |
159 | 170 | # ifndef ARDUINOJSON_ENABLE_ARDUINO_STRING |
160 | 171 | # define ARDUINOJSON_ENABLE_ARDUINO_STRING 0 |
161 | 172 | # endif |
162 | 173 |
|
163 | 174 | // Disable support for Arduino's Stream class |
| 175 | +// https://arduinojson.org/v7/config/enable_arduino_stream/ |
164 | 176 | # ifndef ARDUINOJSON_ENABLE_ARDUINO_STREAM |
165 | 177 | # define ARDUINOJSON_ENABLE_ARDUINO_STREAM 0 |
166 | 178 | # endif |
|
171 | 183 | # endif |
172 | 184 |
|
173 | 185 | // Enable PROGMEM support on AVR only |
| 186 | +// https://arduinojson.org/v7/config/enable_progmem/ |
174 | 187 | # ifndef ARDUINOJSON_ENABLE_PROGMEM |
175 | 188 | # ifdef __AVR__ |
176 | 189 | # define ARDUINOJSON_ENABLE_PROGMEM 1 |
|
182 | 195 | #endif // ARDUINO |
183 | 196 |
|
184 | 197 | // Convert unicode escape sequence (\u0123) to UTF-8 |
| 198 | +// https://arduinojson.org/v7/config/decode_unicode/ |
185 | 199 | #ifndef ARDUINOJSON_DECODE_UNICODE |
186 | 200 | # define ARDUINOJSON_DECODE_UNICODE 1 |
187 | 201 | #endif |
188 | 202 |
|
189 | 203 | // Ignore comments in input |
| 204 | +// https://arduinojson.org/v7/config/enable_comments/ |
190 | 205 | #ifndef ARDUINOJSON_ENABLE_COMMENTS |
191 | 206 | # define ARDUINOJSON_ENABLE_COMMENTS 0 |
192 | 207 | #endif |
193 | 208 |
|
194 | 209 | // Support NaN in JSON |
| 210 | +// https://arduinojson.org/v7/config/enable_nan/ |
195 | 211 | #ifndef ARDUINOJSON_ENABLE_NAN |
196 | 212 | # define ARDUINOJSON_ENABLE_NAN 0 |
197 | 213 | #endif |
198 | 214 |
|
199 | 215 | // Support Infinity in JSON |
| 216 | +// https://arduinojson.org/v7/config/enable_infinity/ |
200 | 217 | #ifndef ARDUINOJSON_ENABLE_INFINITY |
201 | 218 | # define ARDUINOJSON_ENABLE_INFINITY 0 |
202 | 219 | #endif |
203 | 220 |
|
204 | 221 | // Control the exponentiation threshold for big numbers |
205 | 222 | // CAUTION: cannot be more that 1e9 !!!! |
| 223 | +// https://arduinojson.org/v7/config/positive_exponentiation_threshold/ |
206 | 224 | #ifndef ARDUINOJSON_POSITIVE_EXPONENTIATION_THRESHOLD |
207 | 225 | # define ARDUINOJSON_POSITIVE_EXPONENTIATION_THRESHOLD 1e7 |
208 | 226 | #endif |
209 | 227 |
|
210 | 228 | // Control the exponentiation threshold for small numbers |
| 229 | +// https://arduinojson.org/v7/config/negative_exponentiation_threshold/ |
211 | 230 | #ifndef ARDUINOJSON_NEGATIVE_EXPONENTIATION_THRESHOLD |
212 | 231 | # define ARDUINOJSON_NEGATIVE_EXPONENTIATION_THRESHOLD 1e-5 |
213 | 232 | #endif |
|
0 commit comments