Initializerorlandos-nl.ikigajson 2.2.3IkigaJSON
init(dictionaryLiteral:)
Creates a new JSONObject from a dictionary literal.
JSONObject.swift:131init(dictionaryLiteral elements: (String, JSONValue)...)
var user: JSONObject = [
"username": "Joannis",
"github": "https://github.com/Joannis",
"creator": true
]
Other members in extension
Type members
init(
) Creates a new, empty JSONObject
init(buffer: ByteBuffer
) throws Parses the buffer as a JSON Object and configures this JSONObject to index and represent the JSON data
init(data: Data
) throws Parses the data as a JSON Object and configures this JSONObject to index and represent the JSON data
init?(json: JSONValue?
) static func == (lhs: JSONObject, rhs: JSONObject
) -> Bool
Instance members
var data: Data
A textual (JSON formatted) representation of this JSONObject as
Foundation.Data
var jsonBuffer: ByteBuffer
The raw textual (JSON formatted) representation of this JSONObject
var keys: [String]
A list of all top-level keys within this JSONObject
var string: String!
A JSON formatted String with the contents of this JSONObject
subscript(String
) -> JSONValue? Reads and writes the properties of this JSONObject by key.
func makeIterator(
) -> JSONObjectIterator func updateValue(JSONValue?, forKey: String
) -> Bool Updates a key to a new value. If
nil
is provided, the value will be removed.