Extract bmml files from bmpr


#1

Hi
I try to extract bmm files from bmpr.
from sqllite I retrive json column data (SELECT attributes,data FROM RESOURCES;)
I need to convert json to xml, because the development already use xml.
when I try to convert format json to xml, attributes are converted to tag and I don"t want to rewrite all my program.
I have tried with different libraries (org.json, …) and with different online tool conversion
Any idea to solve this problem
Example:
{“mockup”:{“controls”:{“control”:[{“ID”:“0”,“properties”:{“text”:“ComboBox”},“typeID”:“ComboBox”,“x”:“39”,“y”:“26”,“zOrder”:“0”},{“ID”:“1”,“h”:“195”,“properties”:{“text”:“Name\r(job
title) ^, Age ^v, Nickname, Employee v\nGiacomo Guilizzoni\rFounder
& CEO, 37, Peldi, (o)\nMarco Botton\rTuttofare, 34, , [x]\nMariah
Maclachlan\rBetter Half, 37, Patata, [-]\nValerie Liberty\rHead Chef,
:), Val, [x]\nGuido Jack Guilizzoni, 6, The Guids, []\n{10L, 20R, 30,
40C}”},“typeID”:“DataGrid”,“w”:“632”,“x”:“109”,“y”:“109”,“zOrder”:“1”}]},“measuredH”:“304”,“measuredW”:“741”,“mockupH”:“278”,“mockupW”:“702”,“version”:“1.0”}}

RESULT :smile_cat:
0ComboBoxComboBox392601195Name\r(job title) ^, Age ^v, Nickname, Employee v
Giacomo Guilizzoni\rFounder & CEO, 37, Peldi, (o)
Marco Botton\rTuttofare, 34, , [x]
Mariah Maclachlan\rBetter Half, 37, Patata, [-]
Valerie Liberty\rHead Chef, :), Val, [x]
Guido Jack Guilizzoni, 6, The Guids, []
{10L, 20R, 30, 40C}DataGrid63210910913047412787021.0


#2

Hi @glipka, trying a simple JSON -> XML conversion is not going to work, as the two formats are semantically different, not just syntattically. We have a pretty complex class internally that does the export, which would be really hard to open-source.

Can I ask what you’re trying to do? What’s your end goal? Maybe with some more context we can come up with some possible solution or workaround…


#3

thanks for your quick answer. I parse bmm files to generate source code.
I will use the function “'export project” to retrieve content of bmml file
Best regards.