Description
The guide about importing and exporting data to JSON file
Features
- JSON data, unlike all other formats, contains full database information, including tables/fields/addons. It can be used for full database data backups
- JSON jobs do not support merge settings, unlike all other formats
- Main database file (bansheegz_database.bytes) can be in JSON format (see Settings addon)
- JSON file can be used to export database structure without data for debugging purpose (from data source page).
Setup
- Read this guide to learn how to export/import data to JSON.
- Enter file path to a json file on data source page
Supported formats
- Row-based: human-readable format, but very inefficient. This format is also used by Settings addon to save main database file in JSON.
- Field-based: more inefficient, than Row-based, but poor readability
- Legacy: deprecated, not recommended
Running export/import in runtime
Use BGJson class static methods to run export/import from C# script.
- Export : export to a file
- ExportToString : export to a string
- Import : import from JSON file
- ImportFromString : import from JSON string