aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Xithrius <[email protected]>2021-02-25 18:42:44 -0800
committerGravatar GitHub <[email protected]>2021-02-25 18:42:44 -0800
commit9b7b545dd9af7e2b66963bae3f81231f5a13138e (patch)
tree658289fd8d93f96ebe29bdf9f9874208d758bf65
parentMerge pull request #1428 from python-discord/wookie184-tag-updates (diff)
parentMerge branch 'master' into json-tag (diff)
Merge pull request #1393 from sebkuip/json-tag
Made a tag to help people fix an empty file JSON error.
-rw-r--r--bot/resources/tags/empty-json.md11
1 files changed, 11 insertions, 0 deletions
diff --git a/bot/resources/tags/empty-json.md b/bot/resources/tags/empty-json.md
new file mode 100644
index 000000000..935544bb7
--- /dev/null
+++ b/bot/resources/tags/empty-json.md
@@ -0,0 +1,11 @@
+When using JSON, you might run into the following error:
+```
+JSONDecodeError: Expecting value: line 1 column 1 (char 0)
+```
+This error could have appeared because you just created the JSON file and there is nothing in it at the moment.
+
+Whilst having empty data is no problem, the file itself may never be completely empty.
+
+You most likely wanted to structure your JSON as a dictionary. To do this, edit your empty JSON file so that it instead contains `{}`.
+
+Different data types are also supported. If you wish to read more on these, please refer to [this article](https://www.tutorialspoint.com/json/json_data_types.htm).