Calling convention: CIP_ShowJSONAsDBTable("JSONStr/JSONObjectPointer":Variant,Format:String, AFormMode:String)
Description: Opens a modal table viewer for either JSON text or a validated JSON-object pointer.
Parameters:
JSONStr/JSONObjectPointer: JSON text or an Integer pointer returned by a CIP JSON function.
Format: JSON structure format, typically “Simple” or “FireDAC”. An empty format defaults to FireDAC when a pointer is supplied.
AFormMode: “SELECT” or “EDIT”
Returns: in select mode the Result value is the ID of the select row if present, if no ID is available, than the index of the record. In “EDIT” mode the input JSON dataset is editable, the Result is the Full JSON DataSet
Availability: Default.
Example:
jo:=CIP_JSON_LoadObjectFromFile("c:\temp\CIPSampleJSON.json");
Result:=CIP_ShowJSONAsDBTable(jo,"","select");
ShowMessage(Result);
JSON Sample for "SIMPLE" structure:
{
"columns": [
{
"name": "idx",
"type": "integer",
"caption": "ID"
},
{
"name": "name",
"type": "string",
"caption": "Name"
},
{
"name": "email",
"type": "string",
"caption": "Email"
},
{
"name": "created_at",
"type": "datetime",
"caption": "Created At"
}
],
"data": [
{
"idx": 12234234,
"name": "John Doe",
"email": "john@example.com",
"created_at": "2026-08-12T10:00:00Z"
},
{
"idx": 223444,
"name": "Kis János",
"email": "jani@gmail.com",
"created_at": "2026-08-12T10:00:00Z"
}
]
}