Erel, a few days ago I created a class to which I pass a .json file generated by your tool. It creates a CSV string (and save it if you want) that contains the "best" of your .json file, only the essential data useful for the AIs.
[Liar! Copilot created that class for me
]
Then I created a B4J-UI tool to perform the "conversion". A second version uses drag & drop:
View attachment 170324
Then... today I thought about modifying this tool of yours. I simply added the class and when your project creates and saves a .json file, the "concise" .csv file is also saved.
This is optional; just add a "true" parameter to the macro:
B4X:
#Macro: After Save, Sync Layouts, ide://run?File=%ADDITIONAL%\..\B4X\lmJsonLayouts.jar&Args=%PROJECT%&Args=%PROJECT_NAME%&Args=true
Example of what it produces:
View attachment 170321
(Note: JSON 14KB - csv 1KB)
Spoiler: Layout1.csv
Name Type Parent Depth Order Left Top Width Height EventName Text Visible Tag CustomType DesignerType
btnDoSomething Button Main 1 0 20 530 120 50 btnDoSomething Click Me true Dbasic.Designer.MetaButton
ftfAddress B4XFloattexTfield Main 1 1 20 50 160 50 ftfAddress true b4j.example.B4XFloattexTfield Dbasic.Designer.MetaCustomView
ivPhoto B4XImageview Main 1 2 20 110 250 230 ivPhoto true b4j.example.B4XImageview Dbasic.Designer.MetaCustomView
Pasted into Excel for better viewing:
View attachment 170323
I'm almost certain you'll suggest I publish the new version, giving it a new name (currently lmJsonLayouts.jar).
I don't like this, as if I'd created something from scratch! I'd prefer to give you the source code—it contains the class that performs the "csv summary," and the very few changes I've made to your source code are marked with 'lm.