GFXprim
2D bitmap graphics library with emphasis on speed and correctness
Loading...
Searching...
No Matches
gp_json_common.h
Go to the documentation of this file.
1// SPDX-License-Identifier: LGPL-2.1-or-later
2/*
3 * Copyright (C) 2021-2022 Cyril Hrubis <metan@ucw.cz>
4 */
5
11#ifndef GP_JSON_COMMON_H
12#define GP_JSON_COMMON_H
13
15#define GP_JSON_ERR_MAX 128
17#define GP_JSON_ID_MAX 64
19#define GP_JSON_RECURSION_MAX 128
20
21#define GP_JSON_ERR_PRINT gp_json_err_handler
22#define GP_JSON_ERR_PRINT_PRIV stderr
23
45
52const char *gp_json_type_name(enum gp_json_type type);
53
60void gp_json_err_handler(void *print_priv, const char *line);
61
62typedef struct gp_json_reader gp_json_reader;
63typedef struct gp_json_writer gp_json_writer;
64typedef struct gp_json_val gp_json_val;
65
66#endif /* GP_JSON_COMMON_H */
gp_json_type
A JSON data type.
@ GP_JSON_FLOAT
A floating point.
@ GP_JSON_ARR
A JSON array.
@ GP_JSON_BOOL
A boolean.
@ GP_JSON_VOID
No type. Returned when parser finishes.
@ GP_JSON_STR
A string.
@ GP_JSON_OBJ
A JSON object.
@ GP_JSON_INT
An integer.
@ GP_JSON_NULL
NULL.
void gp_json_err_handler(void *print_priv, const char *line)
Default error print handler.
const char * gp_json_type_name(enum gp_json_type type)
Returns type name.
A JSON parser internal state.
A parsed JSON key value pair.
A JSON writer.