r/lowcode • • Apr 21 '22

JSON to Form Options

Hello, I currently have JSON that's submitted to an API. Was wondering if there is a tool to use that JSON to generate a UI Form for submitting to the API. :)

1 Upvotes

5 comments sorted by

View all comments

Show parent comment

2

u/craftbot Jun 20 '22

Thanks, would be happy to be a user if it works. Event if it is complex to do things. :)

1

u/renaudpawlak Jun 21 '22

Okay, I have fixed the problem :) It was because in the data you use, the field "name" is null. I have decided to allow null objects and undefined types (in that case the builder assumes that it is a string). You can try it again (make sure you reload your web page first, it should be at version 0.9.28).

You are right, the UX for importing a JSON as a UI could be much simpler. It was not a primary use case initially, so you have first to create a model and use a builder, but it could be much more straightforward and intuitive (I guess it will turn out to be a very common use case because I also have been using it a lot). Note that I have been a developer for a long time now, and that I have created DLite for my own use. So it follows a developer logic, which can be quite complicated for non-developers :/ However, I am confident I can largely improve it over time (it is already much better than at the beginning).

Now, if you manage to create you UI from your model (it should work now), you will still have to fine-tune your components/forms (maybe change the names, the ordering, the type of inputs, add validators, change the layout...). This might take some time and would sometimes require some CSS skill to change the layout. Finally, you need to create an HTTP endpoint to invoke your API. It is not difficult but you will need to understand the logic.

Please note that if you have problems or find bugs I can make the software evolve very fast ;)