le_json.h
Go to the documentation of this file.
1 //--------------------------------------------------------------------------------------------------25 * Parsing stops automatically when the end of the document is reached or an error is encountered.65 * calling le_json_SetEventHandler(). This will remain in effect until the parser finishes parsing71 * There is a global error handler that is also set when the parsing is started, and can be changed73 * context, and will therefore not get restored to a previous handler when the parsing of a member99 * 6. LE_JSON_OBJECT_MEMBER - If the event handler calls le_json_GetString(), it will return "name".123 //--------------------------------------------------------------------------------------------------136 //--------------------------------------------------------------------------------------------------140 //--------------------------------------------------------------------------------------------------158 //--------------------------------------------------------------------------------------------------164 //--------------------------------------------------------------------------------------------------166 (171 //--------------------------------------------------------------------------------------------------173 * Enumeration of the different types of errors that can be reported during JSON document parsing.175 //--------------------------------------------------------------------------------------------------184 //--------------------------------------------------------------------------------------------------192 //--------------------------------------------------------------------------------------------------194 (200 //--------------------------------------------------------------------------------------------------205 //--------------------------------------------------------------------------------------------------209 //--------------------------------------------------------------------------------------------------215 //--------------------------------------------------------------------------------------------------224 //--------------------------------------------------------------------------------------------------230 //--------------------------------------------------------------------------------------------------239 //--------------------------------------------------------------------------------------------------245 //--------------------------------------------------------------------------------------------------252 //--------------------------------------------------------------------------------------------------258 //--------------------------------------------------------------------------------------------------265 //--------------------------------------------------------------------------------------------------269 //--------------------------------------------------------------------------------------------------285 //--------------------------------------------------------------------------------------------------293 //--------------------------------------------------------------------------------------------------300 //--------------------------------------------------------------------------------------------------306 //--------------------------------------------------------------------------------------------------313 //--------------------------------------------------------------------------------------------------322 //--------------------------------------------------------------------------------------------------329 //--------------------------------------------------------------------------------------------------335 //--------------------------------------------------------------------------------------------------342 //--------------------------------------------------------------------------------------------------351 //--------------------------------------------------------------------------------------------------358 //--------------------------------------------------------------------------------------------------362 * @warning This function can only be called inside event handlers when LE_JSON_NUMBER events are365 //--------------------------------------------------------------------------------------------------372 //--------------------------------------------------------------------------------------------------376 //--------------------------------------------------------------------------------------------------383 //--------------------------------------------------------------------------------------------------387 //--------------------------------------------------------------------------------------------------394 //--------------------------------------------------------------------------------------------------398 //--------------------------------------------------------------------------------------------------405 //--------------------------------------------------------------------------------------------------414 //--------------------------------------------------------------------------------------------------void le_json_SetEventHandler(le_json_EventHandler_t callbackFunc)void(* le_json_ErrorHandler_t)(le_json_Error_t error, const char *msg)Definition: le_json.h:194le_json_ParsingSessionRef_t le_json_GetSession(void)object started, subsequent object members are part of this objectDefinition: le_json.h:143const char * le_json_GetString(void)string value received: call le_json_GetString() to get valueDefinition: le_json.h:148const char * le_json_GetEventName(le_json_Event_t event)object member name received: Call le_json_GetString() to get nameDefinition: le_json.h:144object finished, subsequent members/values are outside this objectDefinition: le_json.h:145void * le_json_GetOpaquePtr(void)number value received: call le_json_GetNumber() to get valueDefinition: le_json.h:149le_json_ParsingSessionRef_t le_json_Parse(int fd, le_json_EventHandler_t eventHandler, le_json_ErrorHandler_t errorHandler, void *opaquePtr)void le_json_SetErrorHandler(le_json_ErrorHandler_t callbackFunc)le_json_ContextType_t le_json_GetContextType(void)le_json_ParsingSessionRef_t le_json_ParseString(const char *jsonString, le_json_EventHandler_t eventHandler, le_json_ErrorHandler_t errorHandler, void *opaquePtr)size_t le_json_GetBytesRead(le_json_ParsingSessionRef_t session)struct le_json_ParsingSession * le_json_ParsingSessionRef_tDefinition: le_json.h:206void le_json_SetOpaquePtr(void *ptr)array started, upcoming values are elements of this arrayDefinition: le_json.h:146void(* le_json_EventHandler_t)(le_json_Event_t event)Definition: le_json.h:166double le_json_GetNumber(void)void le_json_Cleanup(le_json_ParsingSessionRef_t session)const char * le_json_GetContextName(le_json_ContextType_t context)