Skip to content

Latest commit

 

History

History
56 lines (38 loc) · 936 Bytes

jsonobject.adoc

File metadata and controls

56 lines (38 loc) · 936 Bytes

JsonObject

Represents JSON object.

Note: to parse string into JsonObject use [func-jsonparse].

Instance attributes

Attribute values can be accessed in the same way as instance attribute.

Instance methods

get(key) ⇒ ?

Returns attribute value by the key. Value type depends on the type used in JSON.

Table 1. Parameters

key

String

Attribute key

Return

Attribute value

keys() ⇒ Array

Returns attribute array

Return

Attribute array

serialize() ⇒ String

Returns string with serialized JSON

Return

String with JSON

set(key, value) ⇒ void

Sets attribute referenced by key to the given value.

Table 2. Parameters

key

String

Attribute key

value

String

Attribute new value

Constructors

JsonObject()

Creates new JSON object.

Return

JsonObject object