YamlValue
Object Hierarchy:
Description:
public class YamlValue : Object
Represents a YAML value (scalar, mapping, or sequence).
YamlValue is an immutable representation of a parsed YAML node.
Example:
YamlValue ? root = Yaml.parse ("name: Alice\nage: 30");
string name = root.get ("name").asString ();
Content:
Methods:
- public YamlValue? @get (string key)
Returns a child value by key (for mappings).
- public bool asBool ()
Returns the boolean value, or false if not a boolean.
- public double asDouble ()
Returns the double value, or 0.0 if not a double.
- public int64 asInt ()
Returns the integer value, or 0 if not an integer.
- public string? asString ()
Returns the string value, or null if not a string.
- public YamlValue? at (int index)
Returns a child value by index (for sequences).
- public bool isBool ()
Returns true if this value is a boolean scalar.
- public bool isDouble ()
Returns true if this value is a floating-point scalar.
- public bool isInt ()
Returns true if this value is an integer scalar.
- public bool isMapping ()
Returns true if this value is a mapping (object/dict).
- public bool isNull ()
Returns true if this value is null.
- public bool isSequence ()
Returns true if this value is a sequence (array/list).
- public bool isString ()
Returns true if this value is a string scalar.
- public ArrayList<string>? keys ()
Returns the keys of a mapping in insertion order.
- public int size ()
Returns the number of entries (for mappings or sequences).
Inherited Members:
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