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 [CCode (has_construct_function = false)]
10 public void add_element (owned Json.Node node);
11 public unowned Json.Node get_element (uint index_);
12 public GLib.List<weak Json.Node> get_elements ();
13 public uint get_length ();
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", type_id = "JSON_TYPE_NODE", cheader_filename = "json-glib/json-glib.h")]
35 public weak Json.Node parent;
36 public Json.NodeType type;
37 [CCode (has_construct_function = false)]
38 public Node (Json.NodeType type);
39 public Json.Node copy ();
40 public Json.Array dup_array ();
41 public Json.Object dup_object ();
42 public string dup_string ();
43 public unowned Json.Array get_array ();
44 public bool get_boolean ();
45 public double get_double ();
46 public int get_int ();
47 public unowned Json.Object get_object ();
48 public unowned Json.Node get_parent ();
49 public unowned string get_string ();
50 public void get_value (out GLib.Value value);
51 public GLib.Type get_value_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 [CCode (has_construct_function = false)]
68 public void add_member (string member_name, owned Json.Node node);
69 public unowned Json.Node get_member (string member_name);
70 public GLib.List<weak string> get_members ();
71 public uint get_size ();
72 public GLib.List<weak Json.Node> get_values ();
73 public bool has_member (string member_name);
74 public void remove_member (string member_name);
76 [CCode (cheader_filename = "json-glib/json-glib.h")]
77 public class Parser : GLib.Object {
78 [CCode (has_construct_function = false)]
80 public static GLib.Quark error_quark ();
81 public uint get_current_line ();
82 public uint get_current_pos ();
83 public unowned Json.Node get_root ();
84 public bool has_assignment (out unowned string variable_name);
85 public bool load_from_data (string data, size_t length) throws GLib.Error;
86 public bool load_from_file (string filename) throws GLib.Error;
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-gobject.h")]
98 public interface Serializable {
99 public abstract bool deserialize_property (string property_name, out 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-gobject.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-gobject.h")]
136 public static string serialize_gobject (GLib.Object gobject, out size_t length);