Lines Matching full:writer
17 #include "qapi/qmp/json-writer.h"
151 static void to_json(JSONWriter *writer, const char *name, in to_json() argument
156 json_writer_null(writer, name); in to_json()
163 json_writer_int64(writer, name, val->u.i64); in to_json()
166 json_writer_uint64(writer, name, val->u.u64); in to_json()
169 json_writer_double(writer, name, val->u.dbl); in to_json()
179 json_writer_str(writer, name, qstring_get_str(val)); in to_json()
186 json_writer_start_object(writer, name); in to_json()
191 to_json(writer, qdict_entry_key(entry), qdict_entry_value(entry)); in to_json()
194 json_writer_end_object(writer); in to_json()
201 json_writer_start_array(writer, name); in to_json()
204 to_json(writer, NULL, qlist_entry_obj(entry)); in to_json()
207 json_writer_end_array(writer); in to_json()
213 json_writer_bool(writer, name, qbool_get_bool(val)); in to_json()
223 JSONWriter *writer = json_writer_new(pretty); in qobject_to_json_pretty() local
225 to_json(writer, NULL, obj); in qobject_to_json_pretty()
226 return json_writer_get_and_free(writer); in qobject_to_json_pretty()