1 /* json-glib-1.0.vapi generated by vapigen, do not modify. */
3 [CCode (cprefix = "Json", lower_case_cprefix = "json_")]
6 [CCode (ref_function = "json_array_ref", unref_function = "json_array_unref", cheader_filename = "json-glib/json-glib.h")]
8 public void add_element (owned Json.Node node);
9 public unowned Json.Node get_element (uint index_);
10 public GLib.List<weak Json.Node> get_elements ();
11 public uint get_length ();
12 [CCode (has_construct_function = false)]
14 public void remove_element (uint index_);
15 public static unowned Json.Array sized_new (uint n_elements);
17 [CCode (cheader_filename = "json-glib/json-glib.h")]
18 public class Generator : GLib.Object {
19 [CCode (has_construct_function = false)]
21 public void set_root (Json.Node node);
22 public string to_data (out size_t length);
23 public bool to_file (string filename) throws GLib.Error;
25 public uint indent { get; set; }
27 public bool pretty { get; set; }
29 public Json.Node root { owned get; set; }
32 [CCode (copy_function = "json_node_copy", cheader_filename = "json-glib/json-glib.h")]
35 public weak Json.Node parent;
36 public Json.NodeType type;
37 public Json.Node copy ();
38 public Json.Array dup_array ();
39 public Json.Object dup_object ();
40 public string dup_string ();
41 public unowned Json.Array get_array ();
42 public bool get_boolean ();
43 public double get_double ();
44 public int get_int ();
45 public unowned Json.Object get_object ();
46 public unowned Json.Node get_parent ();
47 public unowned string get_string ();
48 public void get_value (GLib.Value value);
49 public GLib.Type get_value_type ();
50 [CCode (has_construct_function = false)]
51 public Node (Json.NodeType type);
52 public void set_array (Json.Array array);
53 public void set_boolean (bool value);
54 public void set_double (double value);
55 public void set_int (int value);
56 public void set_object (Json.Object object);
57 public void set_string (string value);
58 public void set_value (GLib.Value value);
59 public void take_array (owned Json.Array array);
60 public void take_object (owned Json.Object object);
61 public unowned string type_name ();
64 [CCode (ref_function = "json_object_ref", unref_function = "json_object_unref", cheader_filename = "json-glib/json-glib.h")]
66 public void add_member (string member_name, owned Json.Node node);
67 public unowned Json.Node get_member (string member_name);
68 public GLib.List<weak string> get_members ();
69 public uint get_size ();
70 public GLib.List<weak Json.Node> get_values ();
71 public bool has_member (string member_name);
72 [CCode (has_construct_function = false)]
74 public void remove_member (string member_name);
76 [CCode (cheader_filename = "json-glib/json-glib.h")]
77 public class Parser : GLib.Object {
78 public static GLib.Quark error_quark ();
79 public uint get_current_line ();
80 public uint get_current_pos ();
81 public unowned Json.Node get_root ();
82 public bool has_assignment (out unowned string variable_name);
83 public bool load_from_data (string data, size_t length) throws GLib.Error;
84 public bool load_from_file (string filename) throws GLib.Error;
85 [CCode (has_construct_function = false)]
87 public virtual signal void array_element (Json.Array array, int index_);
88 public virtual signal void array_end (Json.Array array);
89 public virtual signal void array_start ();
90 public virtual signal void error (void* error);
91 public virtual signal void object_end (Json.Object object);
92 public virtual signal void object_member (Json.Object object, string member_name);
93 public virtual signal void object_start ();
94 public virtual signal void parse_end ();
95 public virtual signal void parse_start ();
97 [CCode (cheader_filename = "json-glib/json-glib.h")]
98 public interface Serializable {
99 public abstract bool deserialize_property (string property_name, GLib.Value value, GLib.ParamSpec pspec, Json.Node property_node);
100 public abstract Json.Node serialize_property (string property_name, GLib.Value value, GLib.ParamSpec pspec);
102 [CCode (cprefix = "JSON_NODE_", has_type_id = "0", cheader_filename = "json-glib/json-glib.h")]
103 public enum NodeType {
109 [CCode (cprefix = "JSON_PARSER_ERROR_", has_type_id = "0", cheader_filename = "json-glib/json-glib.h")]
110 public enum ParserError {
114 [CCode (cprefix = "JSON_TOKEN_", has_type_id = "0", cheader_filename = "json-glib/json-glib.h")]
115 public enum TokenType {
123 [CCode (cheader_filename = "json-glib/json-glib.h")]
124 public const int MAJOR_VERSION;
125 [CCode (cheader_filename = "json-glib/json-glib.h")]
126 public const int MICRO_VERSION;
127 [CCode (cheader_filename = "json-glib/json-glib.h")]
128 public const int MINOR_VERSION;
129 [CCode (cheader_filename = "json-glib/json-glib.h")]
130 public const int VERSION_HEX;
131 [CCode (cheader_filename = "json-glib/json-glib.h")]
132 public const string VERSION_S;
133 [CCode (cheader_filename = "json-glib/json-glib.h")]
134 public static GLib.Object construct_gobject (GLib.Type gtype, string data, size_t length) throws GLib.Error;
135 [CCode (cheader_filename = "json-glib/json-glib.h")]
136 public static string serialize_gobject (GLib.Object gobject, out size_t length);