From 40a46ba599ca24d9eef0e0acd16507798503689e Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 29 Dec 2020 02:49:13 +0000 Subject: [PATCH] Merge docs for 'Merge pull request #643 from altrisi/json-reading Reading/Writing JSON in Scarpet' --- docs/scarpet/Full.md | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/docs/scarpet/Full.md b/docs/scarpet/Full.md index 03255965..4b41f448 100644 --- a/docs/scarpet/Full.md +++ b/docs/scarpet/Full.md @@ -4771,12 +4771,15 @@ for folder listing. Supported values for resource `type` are: * `nbt` - NBT tag + * `json` - JSON file * `text` - text resource with automatic newlines added * `raw` - text resource without implied newlines - * `folder` - for `list_files` only - indicting folder listing instead of files - * `shared_nbt`, `shared_text`, `shared_raw`, `shared_folder` - shared versions of the above + * `folder` - for `list_files` only - indicating folder listing instead of files + * `shared_nbt`, `shared_text`, `shared_raw`, `shared_folder`, `shared_json` - shared versions of the above -NBT files have extension `.nbt`, store one NBT tag, and return a NBT type value. Text files have `.txt` extension, +NBT files have extension `.nbt`, store one NBT tag, and return a NBT type value. JSON files have `.json` extension, store +Scarpet numbers, strings, lists, maps and `null` values. Anything else will be saved as a string (including NBT). +Text files have `.txt` extension, stores multiple lines of text and returns lists of all lines from the file. With `write_file`, multiple lines can be sent to the file at once. The only difference between `raw` and `text` types are automatic newlines added after each record to the file. Since files are closed after each write, sending multiple lines of data to