Length-aware views, ordered containers, diagnostics and resource limits. More...
Data Structures | |
| struct | jsonbourne_str |
| Decoded UTF-8 bytes; len, not strlen(), determines the string's extent. More... | |
| struct | jsonbourne_str_loc |
| String view followed by optional source coordinates. More... | |
| struct | jsonbourne_num |
| Original number spelling, retained so reading never rounds through a double. More... | |
| struct | jsonbourne_obj_entry |
| One object member; linked order and duplicate decoded keys are retained. More... | |
| struct | jsonbourne_obj |
| Ordered object members; len must exactly match the linked-list length. More... | |
| struct | jsonbourne_arr_entry |
| One array element in source order. More... | |
| struct | jsonbourne_arr |
| Ordered array elements; explicit length supports bounded traversal. More... | |
| struct | jsonbourne_val |
| Tagged DOM value; children and text borrow the root allocation's lifetime. More... | |
| struct | jsonbourne_val_loc |
| Value view followed by coordinates recorded only with TRACK_LOCATION. More... | |
| struct | jsonbourne_read_err |
| Optional read result; coordinates describe the parser's failure cursor. More... | |
| struct | jsonbourne_read_limits |
| Per-read budgets checked during validation, before a DOM is allocated. More... | |
Macros | |
| #define | JSONBOURNE_READ_ALLOW_EXT_NUMBER |
| Numeric spelling extensions; does not by itself permit Infinity or NaN. | |
Typedefs | |
| typedef size_t | jsonbourne_read_flag |
| Read-option bitmask; combine named options with bitwise OR. | |
| typedef enum jsonbourne_type | jsonbourne_type |
| Payload tag; literals need no separately allocated payload. | |
| typedef struct jsonbourne_str | jsonbourne_str |
| Decoded UTF-8 bytes; len, not strlen(), determines the string's extent. | |
| typedef struct jsonbourne_str_loc | jsonbourne_str_loc |
| String view followed by optional source coordinates. | |
| typedef struct jsonbourne_num | jsonbourne_num |
| Original number spelling, retained so reading never rounds through a double. | |
| typedef struct jsonbourne_val | jsonbourne_val |
| Forward name for values referenced by recursive container entries. | |
| typedef struct jsonbourne_obj_entry | jsonbourne_obj_entry |
| Forward name allowing an object entry to link to its own type. | |
| typedef struct jsonbourne_obj | jsonbourne_obj |
| Ordered object members; len must exactly match the linked-list length. | |
| typedef struct jsonbourne_arr_entry | jsonbourne_arr_entry |
| Forward name allowing an array entry to link to its own type. | |
| typedef struct jsonbourne_arr | jsonbourne_arr |
| Ordered array elements; explicit length supports bounded traversal. | |
| typedef struct jsonbourne_val_loc | jsonbourne_val_loc |
| Value view followed by coordinates recorded only with TRACK_LOCATION. | |
| typedef size_t | jsonbourne_read_code |
| Stable storage type for a diagnostic code, separate from display text. | |
| typedef struct jsonbourne_read_err | jsonbourne_read_err |
| Optional read result; coordinates describe the parser's failure cursor. | |
| typedef struct jsonbourne_read_limits | jsonbourne_read_limits |
| Per-read budgets checked during validation, before a DOM is allocated. | |
Detailed Description
Length-aware views, ordered containers, diagnostics and resource limits.
Macro Definition Documentation
◆ JSONBOURNE_READ_ALLOW_EXT_NUMBER
| #define JSONBOURNE_READ_ALLOW_EXT_NUMBER |
Numeric spelling extensions; does not by itself permit Infinity or NaN.
Definition at line 312 of file jsonbourne.h.
Typedef Documentation
◆ jsonbourne_arr
| typedef struct jsonbourne_arr jsonbourne_arr |
Ordered array elements; explicit length supports bounded traversal.
◆ jsonbourne_arr_entry
| typedef struct jsonbourne_arr_entry jsonbourne_arr_entry |
Forward name allowing an array entry to link to its own type.
Definition at line 232 of file jsonbourne.h.
◆ jsonbourne_num
| typedef struct jsonbourne_num jsonbourne_num |
Original number spelling, retained so reading never rounds through a double.
◆ jsonbourne_obj
| typedef struct jsonbourne_obj jsonbourne_obj |
Ordered object members; len must exactly match the linked-list length.
◆ jsonbourne_obj_entry
| typedef struct jsonbourne_obj_entry jsonbourne_obj_entry |
Forward name allowing an object entry to link to its own type.
Definition at line 217 of file jsonbourne.h.
◆ jsonbourne_read_code
| typedef size_t jsonbourne_read_code |
Stable storage type for a diagnostic code, separate from display text.
Definition at line 267 of file jsonbourne.h.
◆ jsonbourne_read_err
| typedef struct jsonbourne_read_err jsonbourne_read_err |
Optional read result; coordinates describe the parser's failure cursor.
◆ jsonbourne_read_flag
| typedef size_t jsonbourne_read_flag |
Read-option bitmask; combine named options with bitwise OR.
Definition at line 147 of file jsonbourne.h.
◆ jsonbourne_read_limits
| typedef struct jsonbourne_read_limits jsonbourne_read_limits |
Per-read budgets checked during validation, before a DOM is allocated.
Limits are literal upper bounds: zero permits none of the resource, not an unlimited amount. Start with jsonbourne_read_limits_default() so a partially initialized structure cannot accidentally prohibit useful input.
◆ jsonbourne_str
| typedef struct jsonbourne_str jsonbourne_str |
Decoded UTF-8 bytes; len, not strlen(), determines the string's extent.
◆ jsonbourne_str_loc
| typedef struct jsonbourne_str_loc jsonbourne_str_loc |
String view followed by optional source coordinates.
- Precondition
- Only cast a parsed string/key to this type when TRACK_LOCATION was enabled.
Keeping the base first preserves ordinary string access while making location storage opt-in rather than charging every node for coordinates.
◆ jsonbourne_type
| typedef enum jsonbourne_type jsonbourne_type |
Payload tag; literals need no separately allocated payload.
◆ jsonbourne_val
| typedef struct jsonbourne_val jsonbourne_val |
Forward name for values referenced by recursive container entries.
Definition at line 214 of file jsonbourne.h.
◆ jsonbourne_val_loc
| typedef struct jsonbourne_val_loc jsonbourne_val_loc |
Value view followed by coordinates recorded only with TRACK_LOCATION.
- Precondition
- Only use this extension for parsed values created with location tracking.
Enumeration Type Documentation
◆ jsonbourne_read_code_e
Reader failures; zero denotes success and leaves error coordinates zeroed.
Definition at line 269 of file jsonbourne.h.
◆ jsonbourne_read_flag_e
Independent reader options and convenience presets.
Presets are unions of feature bits, not distinct parser modes. Use the names rather than persisting raw masks so code can follow flag remaps.
Definition at line 153 of file jsonbourne.h.
◆ jsonbourne_type
| enum jsonbourne_type |
Payload tag; literals need no separately allocated payload.
| Enumerator | |
|---|---|
| JSONBOURNE_TYPE_STR | Payload is jsonbourne_str. |
| JSONBOURNE_TYPE_NUM | Payload is jsonbourne_num. |
| JSONBOURNE_TYPE_OBJ | Payload is jsonbourne_obj. |
| JSONBOURNE_TYPE_ARR | Payload is jsonbourne_arr. |
| JSONBOURNE_TYPE_TRUE | JSON true; payload is NULL for parsed values. |
| JSONBOURNE_TYPE_FALSE | JSON false; payload is NULL for parsed values. |
| JSONBOURNE_TYPE_NULL | JSON null; payload is NULL for parsed values. |
Definition at line 178 of file jsonbourne.h.