From 14a57bc1d9b929daa89fdbd1159685d78e10ddb3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jure=20=C5=A0orn?= Date: Sun, 11 Aug 2019 17:08:41 +0200 Subject: [PATCH] JSON --- README.md | 2 +- index.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index c2094ca..260fa59 100644 --- a/README.md +++ b/README.md @@ -1730,7 +1730,7 @@ JSON ```python import json = json.dumps(, ensure_ascii=True, indent=None) - = json.loads() + = json.loads() # Raises ValueError on malformed string. ``` ### Read Object from JSON File diff --git a/index.html b/index.html index 19a94e3..8b4660a 100644 --- a/index.html +++ b/index.html @@ -1554,7 +1554,7 @@ shutil.rmtree(<path>) # Deletes th

#JSON

import json
 <str>    = json.dumps(<object>, ensure_ascii=True, indent=None)
-<object> = json.loads(<str>)
+<object> = json.loads(<str>)    # Raises ValueError on malformed string.
 

Read Object from JSON File

def read_json_file(filename):