[msvc] Update csproj files (#4254)
[mono.git] / mono / utils / json.c
index 4de3e9f5cdda6dc7007f81edacff0f4fbbcb5990..331f9038081e178c45067a123ccedf5e4e9c9c01 100644 (file)
@@ -5,11 +5,12 @@
  *   Joao Matos (joao.matos@xamarin.com)
  *
  * Copyright 2015 Xamarin Inc (http://www.xamarin.com)
+ * Licensed under the MIT license. See LICENSE file in the project root for full license information.
  */
 
 #include <mono/utils/json.h>
 
-void json_writer_init (JsonWriter* writer)
+void mono_json_writer_init (JsonWriter* writer)
 {
        g_assert (writer && "Expected a valid JSON writer instance");
 
@@ -17,25 +18,25 @@ void json_writer_init (JsonWriter* writer)
        writer->indent = 0;
 }
 
-void json_writer_destroy (JsonWriter* writer)
+void mono_json_writer_destroy (JsonWriter* writer)
 {
        g_assert (writer && "Expected a valid JSON writer instance");
        g_string_free (writer->text, /*free_segment=*/TRUE);
 }
 
-void json_writer_indent_push(JsonWriter* writer)
+void mono_json_writer_indent_push(JsonWriter* writer)
 {
        g_assert (writer && "Expected a valid JSON writer instance");
        writer->indent += JSON_INDENT_VALUE;
 }
 
-void json_writer_indent_pop(JsonWriter* writer)
+void mono_json_writer_indent_pop(JsonWriter* writer)
 {
        g_assert (writer && "Expected a valid JSON writer instance");
        writer->indent -= JSON_INDENT_VALUE;
 }
 
-void json_writer_indent(JsonWriter* writer)
+void mono_json_writer_indent(JsonWriter* writer)
 {
        g_assert (writer && "Expected a valid JSON writer instance");
 
@@ -44,13 +45,13 @@ void json_writer_indent(JsonWriter* writer)
                g_string_append_c (writer->text, ' ');
 }
 
-void json_writer_vprintf(JsonWriter* writer, const gchar *format, va_list args)
+void mono_json_writer_vprintf(JsonWriter* writer, const gchar *format, va_list args)
 {
        g_assert (writer && "Expected a valid JSON writer instance");
        g_string_append_vprintf (writer->text, format, args);
 }
 
-void json_writer_printf(JsonWriter* writer, const gchar *format, ...)
+void mono_json_writer_printf(JsonWriter* writer, const gchar *format, ...)
 {
        g_assert (writer && "Expected a valid JSON writer instance");
 
@@ -62,34 +63,34 @@ void json_writer_printf(JsonWriter* writer, const gchar *format, ...)
        va_end (args);
 }
 
-void json_writer_array_begin(JsonWriter* writer)
+void mono_json_writer_array_begin(JsonWriter* writer)
 {
        g_assert (writer && "Expected a valid JSON writer instance");
        g_string_append_printf (writer->text, "[\n");
        writer->indent += JSON_INDENT_VALUE;
 }
 
-void json_writer_array_end(JsonWriter* writer)
+void mono_json_writer_array_end(JsonWriter* writer)
 {
        g_assert (writer && "Expected a valid JSON writer instance");
        g_string_append_printf (writer->text, "]");
        writer->indent -= JSON_INDENT_VALUE;
 }
 
-void json_writer_object_begin(JsonWriter* writer)
+void mono_json_writer_object_begin(JsonWriter* writer)
 {
        g_assert (writer && "Expected a valid JSON writer instance");
-       json_writer_printf (writer, "{\n");
+       mono_json_writer_printf (writer, "{\n");
        writer->indent += JSON_INDENT_VALUE;
 }
 
-void json_writer_object_end(JsonWriter* writer)
+void mono_json_writer_object_end(JsonWriter* writer)
 {
        g_assert (writer && "Expected a valid JSON writer instance");
-       json_writer_printf (writer, "}");
+       mono_json_writer_printf (writer, "}");
 }
 
-void json_writer_object_key(JsonWriter* writer, const gchar* format, ...)
+void mono_json_writer_object_key(JsonWriter* writer, const gchar* format, ...)
 {
        g_assert (writer && "Expected a valid JSON writer instance");
 
@@ -97,7 +98,7 @@ void json_writer_object_key(JsonWriter* writer, const gchar* format, ...)
        va_start (args, format);
 
        g_string_append_printf (writer->text, "\"");
-       json_writer_vprintf (writer, format, args);
+       mono_json_writer_vprintf (writer, format, args);
        g_string_append_printf (writer->text, "\" : ");
 
        va_end (args);