How to create JSONForms binding to integrate with JS framework?

There are already angular and react bindings created for JSON forms.

I went through some code and it looks a bit complex.

I was wondering if anybody has rolled out their own or if there is a simple code example out there.

I need to integrate JSON forms into the legacy web application so that JSONForms schema/uischema can control the behavior of the legacy app in terms of display, setting required field based on values etc.

Any help is appreciated. Thank you.

Hi @zammy,

we don’t really offer a “Standalone” JSON Forms lib which you can simply consume via a <script/>. If you need something like this, then you either need to build it yourself or use the linked jsonforms-angular-webcomponent. You can find an example of its usage here.

You could setup a small project with a single React component invoking JSON Forms with the React Material or Vanilla renderers and bundle a small lib with all dependencies. Then you only have React and your custom bundle in your HTML and can render JSON Forms via react-dom into your legacy app. Of course if you prefer you could bundle everything and just expose a Javascript interface, it’s just more work.

The same should be possible with the Angular or Vue bindings if you prefer.

If you don’t want to employ any of these frameworks you would need to create “VanillaJS” bindings and a “VanillaJS” renderer set completely from scratch without the comfort of any of these UI libraries, i.e. you need your own state management and DOM update mechanisms.