TBIJson class enables importing JSON data with automatic handling of nested objects, arrays, and type detection.
Quick Start
Key Methods
ImportFile
Import a JSON file:ImportText
Import from JSON string:Import from TStrings
FromFile with Format
JSON Formats
Normal Format
Standard JSON objects and arrays:Array Format (MongoDB)
Multiple root objects, one per line:Nested Structures
TeeBI automatically handles nested JSON:Hierarchical vs Flat Mode
Data Type Detection
TBIJson automatically detects:- Numbers: Int32, Int64, Double
- Strings: Text
- Booleans: Boolean
- Null values: Missing data markers
- Arrays: Nested tables
- Objects: Sub-structures
Advanced Examples
Import with Progress
Import from Folder
Custom Engine
Use a different JSON parser:Export to JSON
UseTBIJSONExport to save data as JSON:
File Format Detection
Common Patterns
REST API Response
Array of Objects
Common Issues
Empty result from nested JSON
Empty result from nested JSON
Check the hierarchical mode:
MongoDB format not parsing
MongoDB format not parsing
Set the correct format:
Wrong data types detected
Wrong data types detected
JSON parser detects types automatically. To force a type, convert after import:
