Lines Matching refs:JsonVariant
47 typedef struct JsonVariant JsonVariant; typedef
63 int json_variant_new_stringn(JsonVariant **ret, const char *s, size_t n);
64 int json_variant_new_base64(JsonVariant **ret, const void *p, size_t n);
65 int json_variant_new_hex(JsonVariant **ret, const void *p, size_t n);
66 int json_variant_new_integer(JsonVariant **ret, int64_t i);
67 int json_variant_new_unsigned(JsonVariant **ret, uint64_t u);
68 int json_variant_new_real(JsonVariant **ret, double d);
69 int json_variant_new_boolean(JsonVariant **ret, bool b);
70 int json_variant_new_array(JsonVariant **ret, JsonVariant **array, size_t n);
71 int json_variant_new_array_bytes(JsonVariant **ret, const void *p, size_t n);
72 int json_variant_new_array_strv(JsonVariant **ret, char **l);
73 int json_variant_new_object(JsonVariant **ret, JsonVariant **array, size_t n);
74 int json_variant_new_null(JsonVariant **ret);
75 int json_variant_new_id128(JsonVariant **ret, sd_id128_t id);
77 static inline int json_variant_new_string(JsonVariant **ret, const char *s) { in json_variant_new_string()
81 JsonVariant *json_variant_ref(JsonVariant *v);
82 JsonVariant *json_variant_unref(JsonVariant *v);
83 void json_variant_unref_many(JsonVariant **array, size_t n);
93 DEFINE_TRIVIAL_CLEANUP_FUNC(JsonVariant *, json_variant_unref);
95 const char *json_variant_string(JsonVariant *v);
96 int64_t json_variant_integer(JsonVariant *v);
97 uint64_t json_variant_unsigned(JsonVariant *v);
98 double json_variant_real(JsonVariant *v);
99 bool json_variant_boolean(JsonVariant *v);
101 JsonVariantType json_variant_type(JsonVariant *v);
102 bool json_variant_has_type(JsonVariant *v, JsonVariantType type);
104 static inline bool json_variant_is_string(JsonVariant *v) { in json_variant_is_string()
108 static inline bool json_variant_is_integer(JsonVariant *v) { in json_variant_is_integer()
112 static inline bool json_variant_is_unsigned(JsonVariant *v) { in json_variant_is_unsigned()
116 static inline bool json_variant_is_real(JsonVariant *v) { in json_variant_is_real()
120 static inline bool json_variant_is_number(JsonVariant *v) { in json_variant_is_number()
124 static inline bool json_variant_is_boolean(JsonVariant *v) { in json_variant_is_boolean()
128 static inline bool json_variant_is_array(JsonVariant *v) { in json_variant_is_array()
132 static inline bool json_variant_is_object(JsonVariant *v) { in json_variant_is_object()
136 static inline bool json_variant_is_null(JsonVariant *v) { in json_variant_is_null()
140 bool json_variant_is_negative(JsonVariant *v);
141 bool json_variant_is_blank_object(JsonVariant *v);
142 bool json_variant_is_blank_array(JsonVariant *v);
143 bool json_variant_is_normalized(JsonVariant *v);
144 bool json_variant_is_sorted(JsonVariant *v);
146 size_t json_variant_elements(JsonVariant *v);
147 JsonVariant *json_variant_by_index(JsonVariant *v, size_t index);
148 JsonVariant *json_variant_by_key(JsonVariant *v, const char *key);
149 JsonVariant *json_variant_by_key_full(JsonVariant *v, const char *key, JsonVariant **ret_key);
151 bool json_variant_equal(JsonVariant *a, JsonVariant *b);
153 void json_variant_sensitive(JsonVariant *v);
154 bool json_variant_is_sensitive(JsonVariant *v);
157 JsonVariant *variant;
182 int json_variant_get_source(JsonVariant *v, const char **ret_source, unsigned *ret_line, unsigned *…
197 int json_variant_format(JsonVariant *v, JsonFormatFlags flags, char **ret);
198 void json_variant_dump(JsonVariant *v, JsonFormatFlags flags, FILE *f, const char *prefix);
200 int json_variant_filter(JsonVariant **v, char **to_remove);
202 int json_variant_set_field(JsonVariant **v, const char *field, JsonVariant *value);
203 int json_variant_set_field_string(JsonVariant **v, const char *field, const char *value);
204 int json_variant_set_field_integer(JsonVariant **v, const char *field, int64_t value);
205 int json_variant_set_field_unsigned(JsonVariant **v, const char *field, uint64_t value);
206 int json_variant_set_field_boolean(JsonVariant **v, const char *field, bool b);
207 int json_variant_set_field_strv(JsonVariant **v, const char *field, char **l);
209 int json_variant_append_array(JsonVariant **v, JsonVariant *element);
211 int json_variant_merge(JsonVariant **v, JsonVariant *m);
213 int json_variant_strv(JsonVariant *v, char ***ret);
215 int json_variant_sort(JsonVariant **v);
216 int json_variant_normalize(JsonVariant **v);
222 int json_parse(const char *string, JsonParseFlags flags, JsonVariant **ret, unsigned *ret_line, uns…
223 int json_parse_continue(const char **p, JsonParseFlags flags, JsonVariant **ret, unsigned *ret_line…
224 int json_parse_file_at(FILE *f, int dir_fd, const char *path, JsonParseFlags flags, JsonVariant **r…
226 static inline int json_parse_file(FILE *f, const char *path, JsonParseFlags flags, JsonVariant **re… in json_parse_file()
278 #define JSON_BUILD_VARIANT(v) _JSON_BUILD_VARIANT, (JsonVariant*) { v }
279 #define JSON_BUILD_VARIANT_ARRAY(v, n) _JSON_BUILD_VARIANT_ARRAY, (JsonVariant **) { v }, (size_t) …
321 …T_NON_NULL(name, v) _JSON_BUILD_PAIR_VARIANT_NON_NULL, (const char*) { name }, (JsonVariant*) { v }
328 int json_build(JsonVariant **ret, ...);
329 int json_buildv(JsonVariant **ret, va_list ap);
347 typedef int (*JsonDispatchCallback)(const char *name, JsonVariant *variant, JsonDispatchFlags flags…
357 int json_dispatch(JsonVariant *v, const JsonDispatch table[], JsonDispatchCallback bad, JsonDispatc…
359 int json_dispatch_string(const char *name, JsonVariant *variant, JsonDispatchFlags flags, void *use…
360 int json_dispatch_const_string(const char *name, JsonVariant *variant, JsonDispatchFlags flags, voi…
361 int json_dispatch_strv(const char *name, JsonVariant *variant, JsonDispatchFlags flags, void *userd…
362 int json_dispatch_boolean(const char *name, JsonVariant *variant, JsonDispatchFlags flags, void *us…
363 int json_dispatch_tristate(const char *name, JsonVariant *variant, JsonDispatchFlags flags, void *u…
364 int json_dispatch_variant(const char *name, JsonVariant *variant, JsonDispatchFlags flags, void *us…
365 int json_dispatch_int64(const char *name, JsonVariant *variant, JsonDispatchFlags flags, void *user…
366 int json_dispatch_uint64(const char *name, JsonVariant *variant, JsonDispatchFlags flags, void *use…
367 int json_dispatch_uint32(const char *name, JsonVariant *variant, JsonDispatchFlags flags, void *use…
368 int json_dispatch_int32(const char *name, JsonVariant *variant, JsonDispatchFlags flags, void *user…
369 int json_dispatch_uid_gid(const char *name, JsonVariant *variant, JsonDispatchFlags flags, void *us…
370 int json_dispatch_user_group_name(const char *name, JsonVariant *variant, JsonDispatchFlags flags, …
371 int json_dispatch_id128(const char *name, JsonVariant *variant, JsonDispatchFlags flags, void *user…
372 int json_dispatch_unsupported(const char *name, JsonVariant *variant, JsonDispatchFlags flags, void…
398 int json_log_internal(JsonVariant *variant, int level, int error, const char *file, int line, const…
417 (JsonVariant*) ((uintptr_t) UNIQ_T(json_string_const, xq) + 1); \
420 int json_variant_unbase64(JsonVariant *v, void **ret, size_t *ret_size);
421 int json_variant_unhex(JsonVariant *v, void **ret, size_t *ret_size);