Data file format and compatibility #144
Replies: 3 comments
-
I feel like a move to JSON would certainly help third-party app developers. I just created a very simple kit maker app in Ruby. I really didn't want to bring in something quite heavy like Nokogiri for parsing and working with the XML.I ended up just doing simple string substitutions on the template XML. Not ideal but faster and easier than relying on a heavy gem. If the files were JSON they would be very easy to work with in many ways - creation, manipulation, reading/writing, etc. and avoid the need to convert to/from JSON internally. |
Beta Was this translation helpful? Give feedback.
-
A quick look around the storageManager and the calls made to same show places in the code where unknown attributes or tags are tolerated. There are also places where syntax errors and unbalanced tags cause the system to go into __builtin_unreachable(); It would be nice if unknown attributes and tags (to a particular version of our firmware) did not go to __builtin_unreachable() if the XML syntax is correct. Instead we should either just ignore the attributes or tags, or if they are deemed important enough, they can have default values. Figuring out if there are unexpected pathways to __builtin_unreachable() caused by missing or unknown attributes and tags will likely require a systematic review of the code we have. Usually the code just skips to the next matching closing tag or past the attribute value without freaking out. I call this "The Show Must Go On" policy. It won't preserve all values across round-trips between versions, but hopefully won't leave somebody stuck. |
Beta Was this translation helpful? Give feedback.
-
I just ran a test where I sprinkled a few extra attributes and tags in a test file and tried loading that into the current community edition. It seemed to load OK. |
Beta Was this translation helpful? Give feedback.
-
Introduction (V1)
I'd like to start a conversation around the data files on the SD card. This is mainly intended for developers of the application and anyone that directly works with the XML file contents currently found on the deluge.
Situation
Here are a few details about the thought process and where we are currently:
Requirements
I see the following requirements:
Proposed solution
I dont' feel strongly about the proposal so feel free to suggest something else and I also don't know if I get to work on it myself so please step in if you are interrested but I felt it should be written down and also linked to all the 3rd party app creators to see what they have in mind.
Beta Was this translation helpful? Give feedback.
All reactions