Hi Erel, All
I would like to ask whether there is any plan, or if it could be considered, to provide a more complete and official workflow for exporting and importing B4X layouts in JSON format.
I know that it is already possible to export a layout to JSON. I have done some tests by exporting a layout, modifying the JSON with AI, and then importing it back into a B4X project.
For simple changes, such as adding standard views like Label, Button, and similar controls, this works correctly.
The problem appears when the AI needs to generate or modify parts of the layout that use specific libraries or custom views, for example xView, B4XGifView, or other custom components. In these cases, the generated JSON often does not fully match the structure expected by the Designer, and after importing it back into the project, the layout is no longer readable or valid.
In my opinion, it would be very useful to have an official and documented system to:
Or is there already a recommended procedure to do this correctly ?
Thank you.
Marco
I would like to ask whether there is any plan, or if it could be considered, to provide a more complete and official workflow for exporting and importing B4X layouts in JSON format.
I know that it is already possible to export a layout to JSON. I have done some tests by exporting a layout, modifying the JSON with AI, and then importing it back into a B4X project.
For simple changes, such as adding standard views like Label, Button, and similar controls, this works correctly.
The problem appears when the AI needs to generate or modify parts of the layout that use specific libraries or custom views, for example xView, B4XGifView, or other custom components. In these cases, the generated JSON often does not fully match the structure expected by the Designer, and after importing it back into the project, the layout is no longer readable or valid.
In my opinion, it would be very useful to have an official and documented system to:
- export a .bal, .bil, or .bjl layout to a stable JSON format;
- allow the JSON to be modified by external tools, including AI tools;
- validate the JSON before importing it;
- import it back into the project and correctly regenerate the binary layout format;
- reliably support custom views and additional libraries.
- automatic layout generation with AI;
- quick modification of existing screens;
- creation of responsive layout variants;
- AI-assisted UI refactoring;
- migration or standardization of layouts across B4A, B4i, and B4J.
Or is there already a recommended procedure to do this correctly ?
Thank you.
Marco