Files
pycom-documentation/content/firmwareapi/micropython/ujson.md
Emmanuel Florent 48e3a22c9e initial commit
2019-06-17 14:24:53 +02:00

24 lines
617 B
Markdown

---
title: "ujson"
aliases:
- firmwareapi/micropython/ujson.html
- firmwareapi/micropython/ujson.md
- chapter/firmwareapi/micropython/ujson
---
This modules allows to convert between Python objects and the JSON data format.
## Methods
#### ujson.dumps(obj)
Return `obj` represented as a JSON string.
#### ujson.loads(str)
Parse the JSON `str` and return an object. Raises `ValueError` if the string is not correctly formed.
#### ujson.load(fp)
Parse contents of `fp` (a `.read()`-supporting file-like object containing a JSON document). Raises `ValueError` if the content is not correctly formed.