Configuration

This is the default configuration of the middleware. When any of the settings shall be modified, it shall be done in dedicated application config lwjson_opts.h file.

Note

Check Getting started for guidelines on how to create and use configuration file.

group LWJSON_OPT

LwJSON options.

Defines

LWJSON_CFG_REAL_TYPE

Real data type used to parse numbers with floating point number.

This is used for numbers in LWJSON_TYPE_NUM_REAL token data type.

Note

Data type must be signed, normally float or double

LWJSON_CFG_INT_TYPE

Integer type used to parse numbers.

This is used for numbers in LWJSON_TYPE_NUM_INT token data type.

Note

Data type must be signed integer

LWJSON_CFG_COMMENTS

Enables 1 or disables 0 support for inline comments.

Default set to 0 to be JSON compliant

LWJSON_MEMSET(dst, val, len)

Memory set function.

Note

Function footprint is the same as memset

LWJSON_MEMCPY(dst, src, len)

Memory copy function.

Note

Function footprint is the same as memcpy

JSON streaming confiuration.

Defines

LWJSON_CFG_STREAM_KEY_MAX_LEN

Max length of token key (object key name) to be available for stack storage.

LWJSON_CFG_STREAM_STACK_SIZE

Max stack size (depth) in units of lwjson_stream_stack_t structure.

LWJSON_CFG_STREAM_STRING_MAX_LEN

Max size of string for single parsing in units of bytes.

LWJSON_CFG_STREAM_PRIMITIVE_MAX_LEN

Max number of bytes used to parse primitive.

Primitives are all numbers and logical values (null, true, false)