json
JSON encoder and decoder module. This module supports RFC 8259 JSON Standard.
import json
request = json.encode({
"name": "Sarah Zaira",
"id": "0122A",
"age": 22,
"homepage": "https://sarahzaira.com",
"hobbies": [
"Reading",
"Travelling",
]
})
data = json.decode(request)
writer(data)
writeln(data.name)
json
— A default instance of class json
There are no functions.
json
— Main class that implements encoder, decoder, and error information. Note: This class has no instantiation (constructor) method, please use constant json
instead
decode()
— Parse a JSON string encode()
— Convert value
to a JSON string get_error()
— Get error information if json.decode()
returns nothing
(null)