mirror of
https://github.com/pocketpy/pocketpy
synced 2025-10-20 03:20:18 +00:00
527 B
527 B
icon | label |
---|---|
package | json |
pkpy has two JSON modules.
- The built-in JSON module is always available and can be imported via
import json
. - After
v1.2.7
, you can setPK_USE_CJSON
toON
in CMakeLists.txt to enable an alternative JSON modulecjson
.
Their interfaces are the same. cjson
is faster while the built-in json
is more stable since it was developed earlier.
json.loads(s)
Decode a JSON string into a python object.
json.dumps(obj)
Encode a python object into a JSON string.