Simpleson source file.
More...
#include "json.h"
#include <string.h>
#include <assert.h>
|
bool | is_control_character (const char input) |
|
bool | is_hex_digit (const char input) |
|
|
const char * | INT_FORMAT = "%i" |
| Format used for integer to string conversion.
|
|
const char * | UINT_FORMAT = "%u" |
| Format used for unsigned integer to string conversion.
|
|
const char * | LONG_FORMAT = "%li" |
| Format used for long integer to string conversion.
|
|
const char * | ULONG_FORMAT = "%lu" |
| Format used for unsigned long integer to string conversion.
|
|
const char * | CHAR_FORMAT = "%c" |
| Format used for character to string conversion.
|
|
const char * | FLOAT_FORMAT = "%f" |
| Format used for floating-point number to string conversion.
|
|
const char * | DOUBLE_FORMAT = "%lf" |
| Format used for double floating-opint number to string conversion.
|
|
◆ EMPTY_STRING
#define EMPTY_STRING |
( |
|
str | ) |
(*str == '\0') |
Checks for an empty string.
- Parameters
-
- Returns
- True if the string is empty, false if the string is not empty
- Warning
- The string must be null-terminated for this macro to work
◆ END_CHARACTER_ENCOUNTERED
#define END_CHARACTER_ENCOUNTERED |
( |
|
obj, |
|
|
|
index |
|
) |
| (obj.is_array() ? *index == ']' : *index == '}') |
Determines if the end character of serialized JSON is encountered.
- Parameters
-
obj | The JSON object or array that is being written to |
index | The pointer to the character to be checked |
◆ IS_DIGIT
#define IS_DIGIT |
( |
|
input | ) |
(input >= '0' && input <= '9') |
Determines if the supplied character is a digit.
- Parameters
-
input | The character to be tested |
◆ SKIP_WHITE_SPACE
Moves a pointer to the first character that is not white space.
- Parameters
-