Wp.SpaJsonBuilder¶
Fields¶
None
Methods¶
class |
|
class |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Details¶
- class Wp.SpaJsonBuilder¶
New in version 0.4.8.
- classmethod new_array()¶
- Returns:
the new spa json builder
- Return type:
Creates a spa json builder of type array.
- classmethod new_object()¶
- Returns:
the new spa json builder
- Return type:
Creates a spa json builder of type object.
- add_boolean(value)¶
- Parameters:
value (
bool
) – the boolean value
Adds a boolean value into the builder.
- add_from_string(json_str)¶
- Parameters:
json_str (
str
) – the json string
Adds a json string into the builder.
- add_from_stringn(json_str, len)¶
-
Adds a json string with specific length into the builder.
- add_json(json)¶
- Parameters:
json (
Wp.SpaJson
) – the json value
Adds a json value into the builder.
- add_null()¶
Adds a null value into the builder.
- add_property(key)¶
- Parameters:
key (
str
) – the name of the property
Adds a property into the builder.
- end()¶
- Returns:
the constructed spa json object
- Return type:
Ends the builder process and returns the constructed spa json object.
- ref()¶
- Returns:
self with an additional reference count on it
- Return type:
Increases the reference count of a spa json builder.
- unref()¶
Decreases the reference count on self and frees it when the ref count reaches zero.