Skip to content

Use JSON or JSONL ​

JSON formats preserve native types (numbers, booleans) — no quoting or delimiter issues.

JSON (.json) ​

Array of objects:

json
[
  { "Source Text": "Budi", "Opacity": 100 },
  { "Source Text": "Sari", "Opacity": 60 },
  { "Source Text": "Andi", "Opacity": 25 }
]

Object with rows key:

json
{
  "rows": [
    { "Source Text": "Budi", "Opacity": 100 },
    { "Source Text": "Sari", "Opacity": 60 }
  ]
}

Type preservation ​

JSON valueBecomes in EffectCraft
"Budi" (string)text control → "Budi"
100 (number)slider control → 100
true (boolean)checkbox control → true
75.5 (float)slider control → 75.5

No coercion needed — types flow directly.

JSONL / NDJSON (.jsonl, .ndjson) ​

One JSON object per line. Ideal for large datasets (streaming, no memory pressure).

jsonl
{"Source Text": "Budi", "Opacity": 100}
{"Source Text": "Sari", "Opacity": 60}
{"Source Text": "Andi", "Opacity": 25}
  • Empty lines ignored
  • Each line must be valid JSON
  • Line numbers in errors = JSONL line number

Validation ​

Same validation as CSV: every object key must match a control (or be mapped). Extra keys = error.

bash
lakreet-swarm check --template template.ectemplate --data data.json
lakreet-swarm check --template template.ectemplate --data data.jsonl

When to use which ​

FormatBest for
CSVSpreadsheets, Excel export, human editing
JSONProgrammatic generation, native types, small–medium data
JSONLLarge datasets, streaming, log pipelines, 10k+ rows

Mixed types in one file ​

All objects must have the same keys (or missing keys = empty). Missing keys for slider/checkbox = validation error unless --empty-as-default.

Next steps ​

Independent project. Not affiliated with the ArtCraft team or the EffectCraft project.