Beta Bal file as aJSON

alyami

Member
Licensed User
I am sure Erl is aware of this matter and I believe he has his own opinion,

AI today is going to boost B4X to the sky, it will make it the go to platform, but we and AI are facing a choking problem with layout bal file, we are not benefiting from AI for the design and its a time consuming problem to handle this manually,

My wish is to see it solved soon.
 

b4x-de

Active Member
Licensed User
Longtime User
Thread '[B4X] JsonLayouts - synchronize json and binary layouts'
 
Upvote 1

mrserv0

Member
This is cool... Also, Jansens b4x extension for vsc has a command line feature that goes back and fourth from json and binary while showing the diffs if the layouts are tracked in version control
 
Upvote 0

alyami

Member
Licensed User
Thank you gentlemen for your inputs, my wish is to see the bal file as JSON or any format makes the AI do the design by itself, imagine what this going to do for B4X community.
 
Upvote 0

mrserv0

Member
Thank you gentlemen for your inputs, my wish is to see the bal file as JSON or any format makes the AI do the design by itself, imagine what this going to do for B4X community.
This is already possible with his extension too as there is a skill file for working with the layouts, but it's not good at creating one from scratch. And only b4a/j at this stage due to the less openness nature of b4i
 
Upvote 0

aeric

Expert
Licensed User
Longtime User
Yes, there are already model can do that. I use DeepSeek V4 Flash and it's Free.
First it can write a sub BuildUI (for example) that initialize the views with size, position, color, etc and add to the layout or parent.
You can create 2 examples of bal layout files and let the IDE convert them to json layouts.
Then tell the model based on the converted json layouts files, learn the pattern and convert the code in BuildUI to apply to the json layouts files.
Once it is done, let the IDE convert the json layouts back to bal binary format.
After that it will know how to do for the rest.

Note, at the beginning it may create json layouts that failed to convert to bal but if you tell it that the layouts were wrong and fix them for few times, it will see the correct pattern and create correct json layout from there onwards.
 
Upvote 0
Top