Skip to content

parseJson

parseJson(): TransformAst

Defined in: json/parse.ts:30

Create a parseJson transform AST node.

This is the AST factory for the JSON parsing transform. The actual implementation is in parse-impl.ts and must be registered in a TransformRegistry before execution.

TransformAst

TransformAst specification for JSON parsing

// Import to auto-register the implementation
import '@origints/core/json'
const plan = new Planner()
.in(loadFile('config.json'))
.mapIn(parseJson()) // Apply JSON parsing
.emit((out, $) => out.add('host', $.get('host').string()))
.compile()