JsonWorker
Object Hierarchy:
Description:
[
Version ( since =
"7.5" ) ]
public sealed class JsonWorker :
Worker,
ArraySupport,
DictSupport,
ValueSupport
Json helper for de/serialization
Content:
Static methods:
- public static inline string serialize (Object obj, Settings? settings = null)
Serialize GLib.Object into a correct json
string
- public static inline async string serialize_async (Object obj, Settings? settings = null)
- public static inline Array<T> simple_array_from_json<T> (string json, string[]? sub_members = null, Settings? settings = null, CollectionFactory[] collection_hierarchy = new CollectionFactory[0] {}) throws Error
Array creation method from json via Json.deserialize_array
Simple version for fast deserialization without manual Json instance creation
- public static inline async Array<T> simple_array_from_json_async<T> (string json, string[]? sub_members = null, Settings? settings = null) throws Error
- public static inline Dict<Value?> simple_deserialize (string json, string[]? sub_members = null, Settings? settings = null) throws Error
deserialize without manual Json
instance creation
- public static inline Dict<T> simple_dict_from_json<T> (string json, string[]? sub_members = null, Settings? settings = null, CollectionFactory[] collection_hierarchy = new CollectionFactory[0] {}) throws Error
Dict creation method from json via Json.deserialize_dict
Simple version for fast deserialization without manual Json instance creation
- public static inline async Dict<T> simple_dict_from_json_async<T> (string json, string[]? sub_members = null, Settings? settings = null) throws Error
- public static inline T simple_from_json<T> (string json, string[]? sub_members = null, Settings? settings = null) throws Error
Object creation method from json via Json.deserialize_object
Simple version for fast deserialization without manual Json instance creation
- public static inline async T simple_from_json_async<T> (string json, string[]? sub_members = null, Settings? settings = null) throws Error
Creation methods:
- public JsonWorker (string json_string, string[]? sub_members = null, Settings? settings = null) throws Error
Performs initialization for deserialization. Accepts a json string. In
case of a parsing error
- public JsonWorker.from_bytes (Bytes bytes, string[]? sub_members = null, Settings? settings = null) throws Error
Performs initialization for deserialization. Accepts a json string in
the form of bytes, the object GLib.Bytes. In case of a parsing error
- public JsonWorker.from_data (owned uint8[] data, string[]? sub_members = null, Settings? settings = null) throws Error
Performs initialization for deserialization. Accepts a json string in
the form of bytes, an uint8 array. In case of a parsing error
Methods:
Inherited Members:
All known members inherited from class Serialize.Worker
All known members inherited from class GLib.Object
- @get
- @new
- @ref
- @set
- add_toggle_ref
- add_weak_pointer
- bind_property
- connect
- constructed
- disconnect
- dispose
- dup_data
- dup_qdata
- force_floating
- freeze_notify
- get_class
- get_data
- get_property
- get_qdata
- get_type
- getv
- interface_find_property
- interface_install_property
- interface_list_properties
- is_floating
- new_valist
- new_with_properties
- newv
- notify
- notify_property
- ref_count
- ref_sink
- remove_toggle_ref
- remove_weak_pointer
- replace_data
- replace_qdata
- set_data
- set_data_full
- set_property
- set_qdata
- set_qdata_full
- set_valist
- setv
- steal_data
- steal_qdata
- thaw_notify
- unref
- watch_closure
- weak_ref
- weak_unref
All known members inherited from interface Serialize.ArraySupport
All known members inherited from interface Serialize.DictSupport
All known members inherited from interface Serialize.ValueSupport