I am still battling the apparent conceptual chaos of the LUUP programming model. Why are there two parallel ways of serializing a data structure, namely .XML and .JSON? I find this very confusing. I can look at .XML files in many editors while I have to open .JSON files with some difficulties in a text editor. Is there a reason, why not all data structures in LUUP are handled by .XML?
JSON is perfect for javascript programming. This makes it a lot better for web programming - UI5 uses it, as does dataMine and probably most of the other interfaces.
If you want to view a JSON file, put it into jsonlint.com to reformat it - then it’s nice and simple to read.
Cheers
Chris
Also to note that json is Vera’s native format. When requesting an xml format for example user_data2, vera has to convert the json to xml. Not sure why there are two formats. MCV gives you the option of what format to use. Are you referring to the formats mainly used for plugins?
- Garrett
The UI file is a Json because it’s used by the UI, while the rest of the files are XML because it’s the standard UPnP format.
You can also use Notepad++ with the JSMin plugin, which gives you the option to format JS and Json.