JXM JSON
{
"component": "div",
"children": "JSONX"
}
Build React elements, HTML, JSX text, and Express views from serializable UI definitions.
{
"component": "section",
"props": {
"className": "notice"
},
"children": [
{ "h2": "Hello, JSONX" },
{ "p": "Defined in JSON, rendered as React." },
{
"button": {
"props": { "type": "button" },
"children": "Click me"
}
}
]
}
Defined in JSON, rendered as React.
Describe UI once, then render it where the system needs it.
{
"component": "div",
"children": "JSONX"
}
div: Box
h1: Heading
p: Text
render(jxm, map)
<Box>JSONX</Box>
<div class="notice">
<h2>Hello, JSONX</h2>
<p>Defined in JSON, rendered as React.</p>
</div>
Use JSONX when UI needs to move through a system as data.
Store view definitions.
Render HTML strings.
Map custom components.
Use a documented JSON shape.
Install the package, render a small JXM object, then move into the manual when the view model needs more structure.
> npm i jsonx