Breaks down large JSON files into a neat directory structure.
Place jsonbreak and/or jsonrebuild into your python project's folder and import their functions:
from jsonbreak.py import disassemble_json
from jsonrebuild.py import rebuild_jsonThen, use the functions like so:
disassemble_json(data, path, *, split_arrays=True/False)data: The raw JSON data to be disassembled (JSON dump, not file path)path: the path where to save the disassembled JSON directory structure
rebuild_json(path)path: The generated directory structure to reassemble.
rebuild_jsonreturns a direct dump of the rebuilt json.
Disassembling project.json from a Scratch 3 project produces something like:
src/
βββ customFonts
βΒ Β βββ 0.json
βΒ Β βββ 1.json
βββ extensions
βΒ Β βββ 0.json
βΒ Β βββ 1.json
βΒ Β βββ 2.json
βΒ Β βββ 3.json
βββ extensionURLs
βΒ Β βββ index.json
βββ meta
βΒ Β βββ index.json
βΒ Β βββ platform
βΒ Β βββ index.json
(...)