70 #ifdef JSONAPI_USE_PQEXPBUFFER
71 #define jsonapi_StrValType PQExpBufferData
73 #define jsonapi_StrValType StringInfoData
96 #define JSONLEX_FREE_STRUCT (1 << 0)
97 #define JSONLEX_FREE_STRVAL (1 << 1)
JsonParseErrorType pg_parse_json_incremental(JsonLexContext *lex, const JsonSemAction *sem, const char *json, size_t len, bool is_last)
bool IsValidJsonNumber(const char *str, size_t len)
struct JsonLexContext JsonLexContext
JsonParseErrorType(* json_struct_action)(void *state)
JsonParseErrorType(* json_aelem_action)(void *state, bool isnull)
JsonParseErrorType pg_parse_json(JsonLexContext *lex, const JsonSemAction *sem)
#define jsonapi_StrValType
@ JSON_EXPECTED_ARRAY_FIRST
@ JSON_UNICODE_HIGH_SURROGATE
@ JSON_EXPECTED_OBJECT_FIRST
@ JSON_UNICODE_CODE_POINT_ZERO
@ JSON_INVALID_LEXER_TYPE
@ JSON_UNICODE_ESCAPE_FORMAT
@ JSON_UNICODE_UNTRANSLATABLE
@ JSON_EXPECTED_OBJECT_NEXT
@ JSON_EXPECTED_ARRAY_NEXT
@ JSON_UNICODE_HIGH_ESCAPE
@ JSON_UNICODE_LOW_SURROGATE
JsonParseErrorType(* json_ofield_action)(void *state, char *fname, bool isnull)
char * json_errdetail(JsonParseErrorType error, JsonLexContext *lex)
PGDLLIMPORT const JsonSemAction nullSemAction
@ JSON_TOKEN_OBJECT_START
JsonParseErrorType json_lex(JsonLexContext *lex)
JsonParseErrorType(* json_scalar_action)(void *state, char *token, JsonTokenType tokentype)
JsonLexContext * makeJsonLexContextCstringLen(JsonLexContext *lex, const char *json, size_t len, int encoding, bool need_escapes)
JsonParseErrorType json_count_array_elements(JsonLexContext *lex, int *elements)
void freeJsonLexContext(JsonLexContext *lex)
JsonLexContext * makeJsonLexContextIncremental(JsonLexContext *lex, int encoding, bool need_escapes)
struct JsonSemAction JsonSemAction
const char * prev_token_terminator
struct jsonapi_StrValType * strval
struct jsonapi_StrValType * errormsg
JsonIncrementalState * inc_state
const char * token_terminator
json_struct_action array_end
json_struct_action object_start
json_ofield_action object_field_start
json_aelem_action array_element_start
json_scalar_action scalar
json_aelem_action array_element_end
json_struct_action array_start
json_struct_action object_end
json_ofield_action object_field_end