About half the size on lists
Arrays of same-shaped objects become tables: keys written once, nested fields flattened into the header. 45% smaller than minified JSON on a list of 1,000 users.
Benchmarks
Compact key-value text that is about half the size of JSON on list payloads, cheaper in LLM prompts, and maps straight to typed models in every frontend framework.
import { encode } from "@flattype/core";
encode({ page: 1, users: [{ id: 1, name: "Alice", address: { city: "Paris" } }, { id: 2, name: "Bob", address: { city: "Delhi" } }] });
// page: 1
// users[2]{id,name,address.city}:
// 1, Alice, Paris
// 2, Bob, Delhi