JUCE-7.0.12-0-g4f43011b96 JUCE-7.0.12-0-g4f43011b96
JUCE — C++ application framework with suport for VST, VST3, LV2 audio plug-ins

« « « Anklang Documentation
Loading...
Searching...
No Matches
Classes | Macros | Enumerations | Functions
json.h File Reference
#include <stddef.h>
#include <string.h>
#include <stdlib.h>
#include <inttypes.h>

Go to the source code of this file.

Classes

struct  json_string_s
 
struct  json_string_ex_s
 
struct  json_number_s
 
struct  json_object_element_s
 
struct  json_object_s
 
struct  json_array_element_s
 
struct  json_array_s
 
struct  json_value_s
 
struct  json_value_ex_s
 
struct  json_parse_result_s
 
struct  json_parse_state_s
 
struct  json_extract_result_s
 
struct  json_extract_state_s
 

Macros

#define json_uintmax_t
 
#define json_strtoumax
 
#define json_null
 

Enumerations

enum  json_parse_flags_e {
  json_parse_flags_default , json_parse_flags_allow_trailing_comma , json_parse_flags_allow_unquoted_keys , json_parse_flags_allow_global_object ,
  json_parse_flags_allow_equals_in_object , json_parse_flags_allow_no_commas , json_parse_flags_allow_c_style_comments , json_parse_flags_deprecated ,
  json_parse_flags_allow_location_information , json_parse_flags_allow_single_quoted_strings , json_parse_flags_allow_hexadecimal_numbers , json_parse_flags_allow_leading_plus_sign ,
  json_parse_flags_allow_leading_or_trailing_decimal_point , json_parse_flags_allow_inf_and_nan , json_parse_flags_allow_multi_line_strings , json_parse_flags_allow_simplified_json ,
  json_parse_flags_allow_json5
}
 
enum  json_type_e {
  json_type_string , json_type_number , json_type_object , json_type_array ,
  json_type_true , json_type_false , json_type_null
}
 
enum  json_parse_error_e {
  json_parse_error_none , json_parse_error_expected_comma_or_closing_bracket , json_parse_error_expected_colon , json_parse_error_expected_opening_quote ,
  json_parse_error_invalid_string_escape_sequence , json_parse_error_invalid_number_format , json_parse_error_invalid_value , json_parse_error_premature_end_of_buffer ,
  json_parse_error_invalid_string , json_parse_error_allocator_failed , json_parse_error_unexpected_trailing_characters , json_parse_error_unknown
}
 

Functions

json_weak struct json_value_sjson_parse (const void *src, size_t src_size)
 
json_weak struct json_value_sjson_parse_ex (const void *src, size_t src_size, size_t flags_bitset, void *(*alloc_func_ptr)(void *, size_t), void *user_data, struct json_parse_result_s *result)
 
json_weak struct json_value_sjson_extract_value (const struct json_value_s *value)
 
json_weak struct json_value_sjson_extract_value_ex (const struct json_value_s *value, void *(*alloc_func_ptr)(void *, size_t), void *user_data)
 
json_weak void * json_write_minified (const struct json_value_s *value, size_t *out_size)
 
json_weak void * json_write_pretty (const struct json_value_s *value, const char *indent, const char *newline, size_t *out_size)
 
json_weak struct json_string_sjson_value_as_string (struct json_value_s *const value)
 
json_weak struct json_number_sjson_value_as_number (struct json_value_s *const value)
 
json_weak struct json_object_sjson_value_as_object (struct json_value_s *const value)
 
json_weak struct json_array_sjson_value_as_array (struct json_value_s *const value)
 
json_weak int json_value_is_true (const struct json_value_s *const value)
 
json_weak int json_value_is_false (const struct json_value_s *const value)
 
json_weak int json_value_is_null (const struct json_value_s *const value)
 
json_weak int json_hexadecimal_digit (const char c)
 
json_weak int json_hexadecimal_value (const char *c, const unsigned long size, unsigned long *result)
 
json_weak int json_skip_whitespace (struct json_parse_state_s *state)
 
json_weak int json_skip_c_style_comments (struct json_parse_state_s *state)
 
json_weak int json_skip_all_skippables (struct json_parse_state_s *state)
 
json_weak int json_get_value_size (struct json_parse_state_s *state, int is_global_object)
 
json_weak int json_get_string_size (struct json_parse_state_s *state, size_t is_key)
 
json_weak int is_valid_unquoted_key_char (const char c)
 
json_weak int json_get_key_size (struct json_parse_state_s *state)
 
json_weak int json_get_object_size (struct json_parse_state_s *state, int is_global_object)
 
json_weak int json_get_array_size (struct json_parse_state_s *state)
 
json_weak int json_get_number_size (struct json_parse_state_s *state)
 
json_weak void json_parse_value (struct json_parse_state_s *state, int is_global_object, struct json_value_s *value)
 
json_weak void json_parse_string (struct json_parse_state_s *state, struct json_string_s *string)
 
json_weak void json_parse_key (struct json_parse_state_s *state, struct json_string_s *string)
 
json_weak void json_parse_object (struct json_parse_state_s *state, int is_global_object, struct json_object_s *object)
 
json_weak void json_parse_array (struct json_parse_state_s *state, struct json_array_s *array)
 
json_weak void json_parse_number (struct json_parse_state_s *state, struct json_number_s *number)
 
struct json_value_sjson_parse_ex (const void *src, size_t src_size, size_t flags_bitset, void *(*alloc_func_ptr)(void *user_data, size_t size), void *user_data, struct json_parse_result_s *result)
 
json_weak struct json_extract_result_s json_extract_get_number_size (const struct json_number_s *const number)
 
json_weak struct json_extract_result_s json_extract_get_string_size (const struct json_string_s *const string)
 
json_weak struct json_extract_result_s json_extract_get_object_size (const struct json_object_s *const object)
 
json_weak struct json_extract_result_s json_extract_get_array_size (const struct json_array_s *const array)
 
json_weak struct json_extract_result_s json_extract_get_value_size (const struct json_value_s *const value)
 
json_weak void json_extract_copy_value (struct json_extract_state_s *const state, const struct json_value_s *const value)
 
json_weak int json_write_minified_get_value_size (const struct json_value_s *value, size_t *size)
 
json_weak int json_write_get_number_size (const struct json_number_s *number, size_t *size)
 
json_weak int json_write_get_string_size (const struct json_string_s *string, size_t *size)
 
json_weak int json_write_minified_get_array_size (const struct json_array_s *array, size_t *size)
 
json_weak int json_write_minified_get_object_size (const struct json_object_s *object, size_t *size)
 
json_weak charjson_write_minified_value (const struct json_value_s *value, char *data)
 
json_weak charjson_write_number (const struct json_number_s *number, char *data)
 
json_weak charjson_write_string (const struct json_string_s *string, char *data)
 
json_weak charjson_write_minified_array (const struct json_array_s *array, char *data)
 
json_weak charjson_write_minified_object (const struct json_object_s *object, char *data)
 
json_weak int json_write_pretty_get_value_size (const struct json_value_s *value, size_t depth, size_t indent_size, size_t newline_size, size_t *size)
 
json_weak int json_write_pretty_get_array_size (const struct json_array_s *array, size_t depth, size_t indent_size, size_t newline_size, size_t *size)
 
json_weak int json_write_pretty_get_object_size (const struct json_object_s *object, size_t depth, size_t indent_size, size_t newline_size, size_t *size)
 
json_weak charjson_write_pretty_value (const struct json_value_s *value, size_t depth, const char *indent, const char *newline, char *data)
 
json_weak charjson_write_pretty_array (const struct json_array_s *array, size_t depth, const char *indent, const char *newline, char *data)
 
json_weak charjson_write_pretty_object (const struct json_object_s *object, size_t depth, const char *indent, const char *newline, char *data)
 

Class Documentation

◆ json_string_s

struct json_string_s

Definition at line 232 of file json.h.

Class Members
const char * string
size_t string_size

◆ json_string_ex_s

struct json_string_ex_s

Definition at line 240 of file json.h.

Class Members
size_t line_no
size_t offset
size_t row_no
struct json_string_s string

◆ json_number_s

struct json_number_s

Definition at line 255 of file json.h.

Class Members
const char * number
size_t number_size

◆ json_object_element_s

struct json_object_element_s

Definition at line 263 of file json.h.

Class Members
struct json_string_s * name
struct json_object_element_s * next
struct json_value_s * value

◆ json_object_s

struct json_object_s

Definition at line 273 of file json.h.

Class Members
size_t length
struct json_object_element_s * start

◆ json_array_element_s

struct json_array_element_s

Definition at line 281 of file json.h.

Class Members
struct json_array_element_s * next
struct json_value_s * value

◆ json_array_s

struct json_array_s

Definition at line 289 of file json.h.

Class Members
size_t length
struct json_array_element_s * start

◆ json_value_s

struct json_value_s

Definition at line 297 of file json.h.

Class Members
void * payload
size_t type

◆ json_value_ex_s

struct json_value_ex_s

Definition at line 310 of file json.h.

Class Members
size_t line_no
size_t offset
size_t row_no
struct json_value_s value

◆ json_parse_result_s

struct json_parse_result_s

Definition at line 367 of file json.h.

Class Members
size_t error
size_t error_line_no
size_t error_offset
size_t error_row_no

◆ json_parse_state_s

struct json_parse_state_s

Definition at line 445 of file json.h.

Class Members
char * data
size_t data_size
char * dom
size_t dom_size
size_t error
size_t flags_bitset
size_t line_no
size_t line_offset
size_t offset
size_t size
const char * src

◆ json_extract_result_s

struct json_extract_result_s

Definition at line 2119 of file json.h.

Class Members
size_t data_size
size_t dom_size

◆ json_extract_state_s

struct json_extract_state_s

Definition at line 2236 of file json.h.

Class Members
char * data
char * dom

Macro Definition Documentation

◆ json_null

#define json_null

Definition at line 407 of file json.h.

◆ json_strtoumax

#define json_strtoumax

Definition at line 401 of file json.h.

◆ json_uintmax_t

#define json_uintmax_t

Definition at line 395 of file json.h.

Enumeration Type Documentation

◆ json_parse_error_e

enum json_parse_error_e

Definition at line 325 of file json.h.

◆ json_parse_flags_e

enum json_parse_flags_e

Definition at line 67 of file json.h.

◆ json_type_e

enum json_type_e

Definition at line 221 of file json.h.

Function Documentation

◆ is_valid_unquoted_key_char()

int is_valid_unquoted_key_char ( const char  c)

Definition at line 835 of file json.h.

◆ json_extract_copy_value()

void json_extract_copy_value ( struct json_extract_state_s *const  state,
const struct json_value_s *const  value 
)

Definition at line 2243 of file json.h.

◆ json_extract_get_array_size()

struct json_extract_result_s json_extract_get_array_size ( const struct json_array_s *const  array)

Definition at line 2184 of file json.h.

◆ json_extract_get_number_size()

struct json_extract_result_s json_extract_get_number_size ( const struct json_number_s *const  number)

Definition at line 2140 of file json.h.

◆ json_extract_get_object_size()

struct json_extract_result_s json_extract_get_object_size ( const struct json_object_s *const  object)

Definition at line 2156 of file json.h.

◆ json_extract_get_string_size()

struct json_extract_result_s json_extract_get_string_size ( const struct json_string_s *const  string)

Definition at line 2148 of file json.h.

◆ json_extract_get_value_size()

struct json_extract_result_s json_extract_get_value_size ( const struct json_value_s *const  value)

Definition at line 2207 of file json.h.

◆ json_extract_value()

struct json_value_s * json_extract_value ( const struct json_value_s value)

Definition at line 2124 of file json.h.

◆ json_extract_value_ex()

struct json_value_s * json_extract_value_ex ( const struct json_value_s value,
void *(*)(void *, size_t alloc_func_ptr,
void *  user_data 
)

Definition at line 2345 of file json.h.

◆ json_get_array_size()

int json_get_array_size ( struct json_parse_state_s state)

Definition at line 1026 of file json.h.

◆ json_get_key_size()

int json_get_key_size ( struct json_parse_state_s state)

Definition at line 841 of file json.h.

◆ json_get_number_size()

int json_get_number_size ( struct json_parse_state_s state)

Definition at line 1099 of file json.h.

◆ json_get_object_size()

int json_get_object_size ( struct json_parse_state_s state,
int  is_global_object 
)

Definition at line 889 of file json.h.

◆ json_get_string_size()

int json_get_string_size ( struct json_parse_state_s state,
size_t  is_key 
)

Definition at line 654 of file json.h.

◆ json_get_value_size()

int json_get_value_size ( struct json_parse_state_s state,
int  is_global_object 
)

Definition at line 1297 of file json.h.

◆ json_hexadecimal_digit()

int json_hexadecimal_digit ( const char  c)

Definition at line 461 of file json.h.

◆ json_hexadecimal_value()

int json_hexadecimal_value ( const char c,
const unsigned long  size,
unsigned long result 
)

Definition at line 476 of file json.h.

◆ json_parse()

struct json_value_s * json_parse ( const void *  src,
size_t  src_size 
)

Definition at line 2114 of file json.h.

◆ json_parse_array()

void json_parse_array ( struct json_parse_state_s state,
struct json_array_s array 
)

Definition at line 1718 of file json.h.

◆ json_parse_ex()

struct json_value_s * json_parse_ex ( const void *  src,
size_t  src_size,
size_t  flags_bitset,
void *(*)(void *user_data, size_t size)  alloc_func_ptr,
void *  user_data,
struct json_parse_result_s result 
)

Definition at line 2003 of file json.h.

◆ json_parse_key()

void json_parse_key ( struct json_parse_state_s state,
struct json_string_s string 
)

Definition at line 1540 of file json.h.

◆ json_parse_number()

void json_parse_number ( struct json_parse_state_s state,
struct json_number_s number 
)

Definition at line 1808 of file json.h.

◆ json_parse_object()

void json_parse_object ( struct json_parse_state_s state,
int  is_global_object,
struct json_object_s object 
)

Definition at line 1581 of file json.h.

◆ json_parse_string()

void json_parse_string ( struct json_parse_state_s state,
struct json_string_s string 
)

Definition at line 1408 of file json.h.

◆ json_parse_value()

void json_parse_value ( struct json_parse_state_s state,
int  is_global_object,
struct json_value_s value 
)

Definition at line 1902 of file json.h.

◆ json_skip_all_skippables()

int json_skip_all_skippables ( struct json_parse_state_s state)

Definition at line 603 of file json.h.

◆ json_skip_c_style_comments()

int json_skip_c_style_comments ( struct json_parse_state_s state)

Definition at line 540 of file json.h.

◆ json_skip_whitespace()

int json_skip_whitespace ( struct json_parse_state_s state)

Definition at line 498 of file json.h.

◆ json_value_as_array()

struct json_array_s * json_value_as_array ( struct json_value_s *const  value)

Definition at line 2400 of file json.h.

◆ json_value_as_number()

struct json_number_s * json_value_as_number ( struct json_value_s *const  value)

Definition at line 2384 of file json.h.

◆ json_value_as_object()

struct json_object_s * json_value_as_object ( struct json_value_s *const  value)

Definition at line 2392 of file json.h.

◆ json_value_as_string()

struct json_string_s * json_value_as_string ( struct json_value_s *const  value)

Definition at line 2376 of file json.h.

◆ json_value_is_false()

int json_value_is_false ( const struct json_value_s *const  value)

Definition at line 2412 of file json.h.

◆ json_value_is_null()

int json_value_is_null ( const struct json_value_s *const  value)

Definition at line 2416 of file json.h.

◆ json_value_is_true()

int json_value_is_true ( const struct json_value_s *const  value)

Definition at line 2408 of file json.h.

◆ json_write_get_number_size()

int json_write_get_number_size ( const struct json_number_s number,
size_t size 
)

Definition at line 2426 of file json.h.

◆ json_write_get_string_size()

int json_write_get_string_size ( const struct json_string_s string,
size_t size 
)

Definition at line 2550 of file json.h.

◆ json_write_minified()

void * json_write_minified ( const struct json_value_s value,
size_t out_size 
)

Definition at line 2994 of file json.h.

◆ json_write_minified_array()

char * json_write_minified_array ( const struct json_array_s array,
char data 
)

Definition at line 2897 of file json.h.

◆ json_write_minified_get_array_size()

int json_write_minified_get_array_size ( const struct json_array_s array,
size_t size 
)

Definition at line 2578 of file json.h.

◆ json_write_minified_get_object_size()

int json_write_minified_get_object_size ( const struct json_object_s object,
size_t size 
)

Definition at line 2601 of file json.h.

◆ json_write_minified_get_value_size()

int json_write_minified_get_value_size ( const struct json_value_s value,
size_t size 
)

Definition at line 2631 of file json.h.

◆ json_write_minified_object()

char * json_write_minified_object ( const struct json_object_s object,
char data 
)

Definition at line 2922 of file json.h.

◆ json_write_minified_value()

char * json_write_minified_value ( const struct json_value_s value,
char data 
)

Definition at line 2957 of file json.h.

◆ json_write_number()

char * json_write_number ( const struct json_number_s number,
char data 
)

Definition at line 2666 of file json.h.

◆ json_write_pretty()

void * json_write_pretty ( const struct json_value_s value,
const char indent,
const char newline,
size_t out_size 
)

Definition at line 3336 of file json.h.

◆ json_write_pretty_array()

char * json_write_pretty_array ( const struct json_array_s array,
size_t  depth,
const char indent,
const char newline,
char data 
)

Definition at line 3171 of file json.h.

◆ json_write_pretty_get_array_size()

int json_write_pretty_get_array_size ( const struct json_array_s array,
size_t  depth,
size_t  indent_size,
size_t  newline_size,
size_t size 
)

Definition at line 3044 of file json.h.

◆ json_write_pretty_get_object_size()

int json_write_pretty_get_object_size ( const struct json_object_s object,
size_t  depth,
size_t  indent_size,
size_t  newline_size,
size_t size 
)

Definition at line 3087 of file json.h.

◆ json_write_pretty_get_value_size()

int json_write_pretty_get_value_size ( const struct json_value_s value,
size_t  depth,
size_t  indent_size,
size_t  newline_size,
size_t size 
)

Definition at line 3131 of file json.h.

◆ json_write_pretty_object()

char * json_write_pretty_object ( const struct json_object_s object,
size_t  depth,
const char indent,
const char newline,
char data 
)

Definition at line 3228 of file json.h.

◆ json_write_pretty_value()

char * json_write_pretty_value ( const struct json_value_s value,
size_t  depth,
const char indent,
const char newline,
char data 
)

Definition at line 3297 of file json.h.

◆ json_write_string()

char * json_write_string ( const struct json_string_s string,
char data 
)

Definition at line 2849 of file json.h.