json

JSON parsing.

Functions

merge_json(inputs, output)

Merge several JSON files into one list.

split_json(input, output, chunks)

Split one JSON into many files.

undertale.pipeline.json.split_json(input: str, output: str, chunks: int) List[str]

Split one JSON into many files.

Parameters:
  • input – Path to the JSON input file.

  • output – Path to the target directory.

  • chunks – Number of chunk files to generate.

Returns:

A list of paths to the generated files.

undertale.pipeline.json.merge_json(inputs: List[str], output: str) str

Merge several JSON files into one list.

Input files may contain a single object or a list of objects. Singular objects will append() the final list while lists of objects will extend() it.

Parameters:
  • inputs – Paths to JSON object files.

  • output – Merged output path.

Returns:

The path to the merged JSON output file.