Illustrated C/C++ source sheets, symbol index, API relationship graph, compiler console and debug trace

LIVE AI / FLEXIBLE SENSING / FLIGHT CONTEXT

Sensoraia API

Live AI and sensing, connected to the flight.
See, listen, inspect and return supported results while airborne.

Loading...
Searching...
No Matches
DOM Types and Read Options

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.

Enumerations

enum  jsonbourne_read_flag_e {
  JSONBOURNE_READ_NOFLAG = 0 , JSONBOURNE_READ_ALLOW_TRAILING_COMMAS = 0x0002 , JSONBOURNE_READ_ALLOW_UNQUOTED_KEY = 0x0004 , JSONBOURNE_READ_ALLOW_GLOBAL_OBJECT = 0x0008 ,
  JSONBOURNE_READ_ALLOW_EQUALS = 0x0010 , JSONBOURNE_READ_ALLOW_NO_COMMAS = 0x0020 , JSONBOURNE_READ_ALLOW_COMMENTS = 0x0040 , JSONBOURNE_READ_RESERVED = 0x0080 ,
  JSONBOURNE_READ_TRACK_LOCATION = 0x0100 , JSONBOURNE_READ_ALLOW_SINGLE_QUOTED_STR = 0x0200 , JSONBOURNE_READ_ALLOW_HEX_NUM = 0x0400 , JSONBOURNE_READ_ALLOW_PLUS_SIGN = 0x0800 ,
  JSONBOURNE_READ_ALLOW_DECIMAL_POINT = 0x1000 , JSONBOURNE_READ_ALLOW_INF_AND_NAN = 0x2000 , JSONBOURNE_READ_ALLOW_MULTILINE_STR = 0x4000 , JSONBOURNE_READ_SIMPLIFIED = 0x003e ,
  JSONBOURNE_READ_JSON5 = 0x7e46
}
 Independent reader options and convenience presets. More...
enum  jsonbourne_type {
  JSONBOURNE_TYPE_STR , JSONBOURNE_TYPE_NUM , JSONBOURNE_TYPE_OBJ , JSONBOURNE_TYPE_ARR ,
  JSONBOURNE_TYPE_TRUE , JSONBOURNE_TYPE_FALSE , JSONBOURNE_TYPE_NULL
}
 Payload tag; literals need no separately allocated payload. More...
enum  jsonbourne_read_code_e {
  JSONBOURNE_READ_SUCCESS = 0 , JSONBOURNE_READ_ERROR_EXPECTED_SEPARATOR , JSONBOURNE_READ_ERROR_EXPECTED_COLON , JSONBOURNE_READ_ERROR_EXPECTED_KEY ,
  JSONBOURNE_READ_ERROR_INVALID_ESCAPE , JSONBOURNE_READ_ERROR_INVALID_NUMBER , JSONBOURNE_READ_ERROR_LITERAL , JSONBOURNE_READ_ERROR_UNEXPECTED_END ,
  JSONBOURNE_READ_ERROR_INVALID_STRING , JSONBOURNE_READ_ERROR_MEMORY_ALLOCATION , JSONBOURNE_READ_ERROR_UNEXPECTED_CONTENT , JSONBOURNE_READ_ERROR_DEPTH ,
  JSONBOURNE_READ_ERROR_INVALID_COMMENT , JSONBOURNE_READ_ERROR_UNKNOWN , JSONBOURNE_READ_ERROR_INVALID_UTF8 , JSONBOURNE_READ_ERROR_LIMIT ,
  JSONBOURNE_READ_ERROR_INVALID_PARAMETER
}
 Reader failures; zero denotes success and leaves error coordinates zeroed. More...

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
Value:

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

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.

Enumerator
JSONBOURNE_READ_SUCCESS 

No read failure.

JSONBOURNE_READ_ERROR_EXPECTED_SEPARATOR 

Missing comma/closure or disallowed trailing comma.

JSONBOURNE_READ_ERROR_EXPECTED_COLON 

Missing permitted key/value separator.

JSONBOURNE_READ_ERROR_EXPECTED_KEY 

Missing or invalid object member name.

JSONBOURNE_READ_ERROR_INVALID_ESCAPE 

Invalid escape or UTF-16 surrogate pairing.

JSONBOURNE_READ_ERROR_INVALID_NUMBER 

Invalid number spelling or token boundary.

JSONBOURNE_READ_ERROR_LITERAL 

Invalid true, false or null spelling/boundary.

JSONBOURNE_READ_ERROR_UNEXPECTED_END 

Input ended before the construct was complete.

JSONBOURNE_READ_ERROR_INVALID_STRING 

Disallowed unescaped string control byte.

JSONBOURNE_READ_ERROR_MEMORY_ALLOCATION 

Allocation failed or caller storage is insufficient.

JSONBOURNE_READ_ERROR_UNEXPECTED_CONTENT 

Non-trivia bytes follow a complete root value.

JSONBOURNE_READ_ERROR_DEPTH 

Container nesting exceeds the effective bound.

JSONBOURNE_READ_ERROR_INVALID_COMMENT 

Block comment has no closing delimiter.

JSONBOURNE_READ_ERROR_UNKNOWN 

Generic diagnostic and unrecognized-code fallback.

JSONBOURNE_READ_ERROR_INVALID_UTF8 

Invalid UTF-8 scalar encoding.

JSONBOURNE_READ_ERROR_LIMIT 

Resource bound or checked arithmetic was exceeded.

JSONBOURNE_READ_ERROR_INVALID_PARAMETER 

Invalid flags, limits, input or storage alignment.

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.

Enumerator
JSONBOURNE_READ_NOFLAG 

Strict RFC 8259 input.

JSONBOURNE_READ_ALLOW_TRAILING_COMMAS 

Permit a comma before container closure.

JSONBOURNE_READ_ALLOW_UNQUOTED_KEY 

Permit nonempty ASCII identifier-like keys.

JSONBOURNE_READ_ALLOW_GLOBAL_OBJECT 

Permit an object without outer braces.

JSONBOURNE_READ_ALLOW_EQUALS 

Permit equals in place of a member colon.

JSONBOURNE_READ_ALLOW_NO_COMMAS 

Permit adjacent members/elements without commas.

JSONBOURNE_READ_ALLOW_COMMENTS 

Skip C-style block and line comments.

JSONBOURNE_READ_RESERVED 

Accepted reserved bit with no syntax effect.

JSONBOURNE_READ_TRACK_LOCATION 

Allocate location extensions for values and keys.

JSONBOURNE_READ_ALLOW_SINGLE_QUOTED_STR 

Permit single quotes and escaped apostrophes.

JSONBOURNE_READ_ALLOW_HEX_NUM 

Permit hexadecimal integer tokens.

JSONBOURNE_READ_ALLOW_PLUS_SIGN 

Permit an explicit positive number sign.

JSONBOURNE_READ_ALLOW_DECIMAL_POINT 

Permit .5 and 1. forms.

JSONBOURNE_READ_ALLOW_INF_AND_NAN 

Permit signed Infinity and NaN tokens.

JSONBOURNE_READ_ALLOW_MULTILINE_STR 

Permit raw CR/LF and escaped line continuations.

JSONBOURNE_READ_SIMPLIFIED 

Combine the five object/spacing conveniences.

JSONBOURNE_READ_JSON5 

JSON5-style conveniences, not full conformance.

Definition at line 153 of file jsonbourne.h.

◆ 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.