Component
DataDialect
Choose Array JSON, CSV or a repeated query string. The words become genuinely different serialized payloads, complete with quoting or URL encoding; restoring the sentence removes the invented data contract.
Possible use
A reviewer could force a handoff sentence to look like a payload before passing it between teams. A presenter could turn an agenda line into CSV or a query string as a visual joke about interoperability. Neither use needs to pretend prose has become data.
Reasonable alternative
A reasonable local alternative is keeping the sentence readable and serializing only at the actual application boundary. A local utility is clearer than making a display component arbitrate data formats.
01 / Preview
Try it yourself.
Current payload
Prepare the ordinary handoffMechanism
- 1
- Start with readable words that have no data format.
- 2
- Choose Array JSON, CSV or Query string.
- 3
- The payload becomes a genuinely different serialization.
- 4
- Restore the sentence when the data costume is no longer useful.
02 / Usage
Put it somewhere.
example.tsxTSX
import { DataDialect } from "gra-ui";
import "gra-ui/styles.css";
export function SerializedBrief() {
return <DataDialect label="Prepare the ordinary handoff" />;
}03 / API
Small surface area.
PropTypeDescription
labelstringThe readable sentence split into words and serialized by the selected dialect.