1 /* json-glib-1.0.vapi generated by lt-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 (Json.Node node);
9 public weak Json.Node get_element (uint index_);
10 public weak GLib.List get_elements ();
11 public uint get_length ();
12 [CCode (has_construct_function = false)]
14 public void remove_element (uint index_);
15 public static weak 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 ulong 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 { 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 weak Json.Node copy ();
38 public weak Json.Array dup_array ();
39 public weak Json.Object dup_object ();
40 public weak string dup_string ();
41 public weak Json.Array get_array ();
42 public bool get_boolean ();
43 public double get_double ();
44 public int get_int ();
45 public weak Json.Object get_object ();
46 public weak Json.Node get_parent ();
47 public weak 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 (Json.Array array);
60 public void take_object (Json.Object object);
61 public weak 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, Json.Node node);
67 public weak Json.Node get_member (string member_name);
68 public weak GLib.List get_members ();
69 public uint get_size ();
70 public weak GLib.List 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 weak Json.Node get_root ();
82 public bool has_assignment (out weak string variable_name);
83 public bool load_from_data (string data, ulong 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, ulong length) throws GLib.Error;
135 [CCode (cheader_filename = "json-glib/json-glib.h")]
136 public static string serialize_gobject (GLib.Object gobject, out ulong length);