2 * Copyright (c) 2020 Eric Hawicz
4 * This library is free software; you can redistribute it and/or modify
5 * it under the terms of the MIT license. See COPYING for details.
13 * @brief Basic types used in a few places in json-c, but you should include "json_object.h" instead.
21 #if defined(_MSC_VER) && defined(JSON_C_DLL)
22 #define JSON_EXPORT __declspec(dllexport)
24 #define JSON_EXPORT extern
31 * A structure to use with json_object_object_foreachC() loops.
32 * Contains key, val and entry members.
34 struct json_object_iter
37 struct json_object *val;
38 struct lh_entry *entry;
40 typedef struct json_object_iter json_object_iter;
42 typedef int json_bool;
45 * @brief The core type for all type of JSON objects handled by json-c
47 typedef struct json_object json_object;
50 * Type of custom user delete functions. See json_object_set_serializer.
52 typedef void(json_object_delete_fn)(struct json_object *jso, void *userdata);
55 * Type of a custom serialization function. See json_object_set_serializer.
57 typedef int(json_object_to_json_string_fn)(struct json_object *jso, struct printbuf *pb, int level,
60 /* supported object types */
62 typedef enum json_type
64 /* If you change this, be sure to update json_type_to_name() too */