liblucy icon indicating copy to clipboard operation
liblucy copied to clipboard

Add option for outputting to JSON

Open mattpocock opened this issue 4 years ago • 4 comments

This would be great for building tools with Lucy - for instance a browser-based visualiser.

mattpocock avatar May 06 '21 16:05 mattpocock

Is there a standard format for what this JSON looks like? Are there any existing tools that consume the JSON format?

matthewp avatar May 06 '21 16:05 matthewp

@matthewp None - I'm imagining that for now, we'd copy the XState format (i.e. the first argument to createMachine) in JSON form.

mattpocock avatar May 06 '21 17:05 mattpocock

if lucy exports a xstate machine, we could use its visualizer out-of-the-box, couldn't?

tonivj5 avatar May 06 '21 18:05 tonivj5

I'd prefer to output to JSON so that you wouldn't need an intermediate Babel transpilation step.

mattpocock avatar May 06 '21 18:05 mattpocock