CX Framework
Cross-platform C utility framework
Loading...
Searching...
No Matches
JSON Types

Data Structures

struct  JSONParseContext
 
struct  JSONParseEvent
 

Typedefs

typedef enum JSON_PARSE_CONTEXT JsonContextType
 JSON parser context types.
 
typedef enum JSON_PARSE_EVENT JsonEventType
 JSON parse event types.
 
typedef struct JSONParseContext JSONParseContext
 
typedef struct JSONParseEvent JSONParseEvent
 

Enumerations

enum  JSON_PARSE_CONTEXT { JSON_Top , JSON_Object , JSON_Array }
 JSON parser context types. More...
 
enum  JSON_PARSE_EVENT {
  JSON_Parse_Unknown , JSON_Object_Begin , JSON_Object_Key , JSON_Object_End ,
  JSON_Array_Begin , JSON_Array_End , JSON_String , JSON_Int ,
  JSON_Float , JSON_True , JSON_False , JSON_Null ,
  JSON_Error , JSON_End
}
 JSON parse event types. More...
 

Detailed Description

Common types used for JSON parsing and output.

Typedef Documentation

◆ JSONParseContext

JSON parser context stack

Tracks the current parsing position in the JSON hierarchy. The parser maintains a stack of these contexts as it descends into nested objects and arrays.

Definition at line 79 of file jsoncommon.h.

◆ JSONParseEvent

JSON parse event

Delivered to callbacks during parsing. Contains the event type, current context, and event-specific data.

Enumeration Type Documentation

◆ JSON_PARSE_CONTEXT

JSON parser context types.

Enumerator
JSON_Top 

Top-level context (bare value)

JSON_Object 

Currently parsing an object.

JSON_Array 

Currently parsing an array.

Definition at line 38 of file jsoncommon.h.

◆ JSON_PARSE_EVENT

JSON parse event types.

Enumerator
JSON_Parse_Unknown 

Never sent; indicates a parse error.

JSON_Object_Begin 

New object starts at current context.

JSON_Object_Key 

Valid JSON string parsed in object key context.

JSON_Object_End 

End of current object.

JSON_Array_Begin 

New array starts at current context.

JSON_Array_End 

End of current array.

JSON_String 

String value parsed.

JSON_Int 

Number parsed that fits in int64.

JSON_Float 

Number parsed that requires float64.

JSON_True 

Boolean true value parsed.

JSON_False 

Boolean false value parsed.

JSON_Null 

Null value parsed.

JSON_Error 

Parse error occurred; strData contains error message (JSON_End follows)

JSON_End 

Parsing finished; cleanup user context if needed.

Definition at line 48 of file jsoncommon.h.