Fwupd.JsonParser¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
class |
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
Properties¶
None
Signals¶
- Inherited:
Fields¶
- Inherited:
Class Details¶
- class Fwupd.JsonParser(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
A streaming tokenizer JSON parser that is resistant to malicious input.
One item of note is that most of the JSON string methods actually return a #GRefString – which can be used to avoid lots of tiny memory allocation when parsing JSON into other objects.
See also: ‘struct@FwupdJsonArray [struct@FwupdJsonObject]’ [struct`FwupdJsonNode`]
- set_max_depth(max_depth)[source]¶
- Parameters:
max_depth (
int) – max nesting depth
Sets the maximum nesting depth.
The default maximum depth is
GObject.G_MAXUINT16, but users ofFwupd.JsonParsershould use this function to set a better limit.New in version 2.1.1.
- set_max_items(max_items)[source]¶
- Parameters:
max_items (
int) – max items
Sets the maximum number of items in an array or object.
The default maximum items is
GObject.G_MAXUINT16, but users ofFwupd.JsonParsershould use this function to set a better limit.New in version 2.1.1.
- set_max_quoted(max_quoted)[source]¶
- Parameters:
max_quoted (
int) – maximum size of a quoted string
Sets the maximum size of a quoted string.
The default maximum quoted string length is
GObject.G_MAXUINT16, but users ofFwupd.JsonParsershould use this function to set a better limit.New in version 2.1.1.