ssapy_toolkit.IO.json_utils
Functions
|
Append data into an existing JSON file. |
|
Load data from a JSON file and decode special types. |
|
|
|
Save data to a JSON file with support for NumPy, datetime, and Astropy Time. |
- ssapy_toolkit.IO.json_utils.append_json(filename: str, new_data) None[source]
Append data into an existing JSON file.
- If root is a dict:
- For each key in new_data:
If key exists and is a list, extend or append.
If key exists and is not a list, convert to list and append.
If key does not exist, add it.
If root is a list, append or extend.
If file does not exist, save new_data as-is.
If types mismatch, wrap both into a list.