I’m new to JSONForms, have been though the tutorials using create-react-app, and can follow the single form handling, when the schema, uischema and data are static files in the react project, like all the demos. We have a legacy application that can generate our Swing-based forms dynamically and manage standard CRUD operations and data persistence. I would like to try to feed JSONForms’ schema and uischema dynamically, while interfacing per RESTful services to the backend, like a persistence API.
Can the schema and uischema objects be told to get what they need from a RESTful endpoint and control events trigger RESTful API operations? If so, does anyone have examples of doing this? Or a CRUD example in this direction? I learn pretty good by example.
Hi @ralph-lance(ralph-lance), JSON Forms itself is primarily intended for rendering the form. CRUD operations are usually handled outside of it, by the application itself. There you can employ your favorite frameworks or for example just use Javascript’s fetch.
Note that this is only a very rough showcase to demonstrate the underlying principles of how JSON Forms can be combined with CRUD. It misses proper error handling, it can’t easily be tested, there is no kind of validation, defensive programming, it has no configuration, authentication etc.