JSON Forms with ASP.NET Core Application, Web API

Hey you guys!

Has anyone tried to connect JSON Forms with ASP.NET Core Application? I am basically checking if this would be feasible.

I am trying to develop website which allows me to quickly develop a form, submit data to SQL Database and perform other CRUD operations. I also want to render the current data from DB in the data table but this is separate task.

I am mostly interested in how to use Web API and how to submit these forms. I am quite new to this so was looking for some basic example to expand my knowledge in this field but the only thing I could find are materials on JSON Forms itself rather than how to set it to submit data to DB. Has anyone tried this and perhaps got some repository I could check?

[original thread by Paul de Champignon]

Hi. Yes that is definitely possible. For example you can just manually add React, Material UI and JSON Forms by loading their respective Javascript libraries. You can then write Javascript in ASP.NET as you are used to, using the non-JSX variant of React. You can access the form data via the onChange handler or the redux state (depending on which JSON Forms variant you want to use) and handle it as you would any other data in your application.

There are also other integration approaches, for example using reactjs.net or building a customized Javascript bundle tailored for your needs via webpack. It all depends on your requirements.

[Paul de Champignon]

Thanks Stefan for quick answer. I have also noticed that there’s angular version of JSON forms: GitHub - eclipsesource/jsonforms-angular-material-playground: Playground for integrating JSONForms with Angular Material. I am not that familiar with React and Angular would be a better choice for me but I can see in all of your materials/presentation you focused on React version of forms. Would you recommend however using this given the impression that main effort is directed towards React version?

The React renderer set is the main priority at the moment. That said, we also plan to support Angular for the foreseeable future. Whether React or Angular is the better fit for your project depends heavily on your requirements.

Hello

I am also interested in using JSON Forms without the nodejs server.

But I haven’t found any documentation on how to “manually add React, Material UI and JSON Forms by loading their respective Javascript libraries”, is there any simple HTML page example demonstrating the procesure? Thanks a lot.

Hi @metorm,

To clarify: JSON Forms is a set of client-side only Javascript libraries. There is no NodeJS requirement for JSON Forms. However most of the developers using JSON Forms utilize NodeJS during development.

I would look for guides which enable you to run React on ASP.NET. Once you have that in place, adding additional libraries on top should not be too hard.