[cert-sync]: Make the new store the default and add '--legacy' for the old one.
[mono-project.git] / mono / utils / json.h
blob79b26165e77eb3a7c6518733c60a89e881b028f3
1 /*
2 * json.h: JSON writer
4 * Author:
5 * Joao Matos (joao.matos@xamarin.com)
7 * Copyright 2015 Xamarin Inc (http://www.xamarin.com)
8 * Licensed under the MIT license. See LICENSE file in the project root for full license information.
9 */
11 #ifndef __MONO_UTILS_JSON_H__
12 #define __MONO_UTILS_JSON_H__
14 #include <glib.h>
16 #define JSON_INDENT_VALUE 2
18 typedef struct JsonWriter {
19 GString* text;
20 int indent;
21 } JsonWriter;
23 void mono_json_writer_init (JsonWriter* writer);
24 void mono_json_writer_destroy (JsonWriter* writer);
25 void mono_json_writer_indent(JsonWriter* writer);
26 void mono_json_writer_indent_push(JsonWriter* writer);
27 void mono_json_writer_indent_pop(JsonWriter* writer);
28 void mono_json_writer_vprintf(JsonWriter* writer, const gchar *format, va_list args);
29 void mono_json_writer_printf(JsonWriter* writer, const gchar *format, ...);
30 void mono_json_writer_array_begin(JsonWriter* writer);
31 void mono_json_writer_array_end(JsonWriter* writer);
32 void mono_json_writer_object_begin(JsonWriter* writer);
33 void mono_json_writer_object_end(JsonWriter* writer);
34 void mono_json_writer_object_key(JsonWriter* writer, const gchar* format, ...);
36 #endif