I have just closed
Leo issue #442 after merging the ekr-json branch into devel.
leoInteg issue #125 describes the format of such files. However, I have changed the assumed format of the 'globals' section. I'll be happy to make changes if Félix wants them.
The save-as-leojs command will convert any outline (.leo file) to .leojs format. The save-as-xml converts any .leojs file back to a .leo file.
I wanted to complete #442 work to keep the PR manageable. I expect Félix or I will open new issues for any desired tweaks.
Félix, please review what I have done. Thanks. We can make changes freely until Leo 6.4 final goes out the door.
Edward