-
Notifications
You must be signed in to change notification settings - Fork 278
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Migrate away from XML to JSON or SKON #1675
Comments
As it stands, the official goal is completing the port to JSON. If SKON is to be implemented (which is not definite as it was a far outlier in the original discussion), it needs to have enough documentation that it can be seen how to use it, and make an informed decision on its use without everyone needing to dig through the code to figure out how to use it. It needs to be shown to be reasonably fast (the last benchmarks I saw it was drastically slower than JSON or XML). It also has to have suitable ways to access it, so far, from the example with sprites, I've seen it has what the JSON.net implementation calls Linq-like (basically creating Dictionaries and arrays nested inside eachother), basically what is used in save file loading, it would also need attribute based automatic deserialization (and preferably serialization) like what the component system has. That being said, it has a general structure very similar to JSON, and as it has the linq-like access method, and if it has or can have added the attribute based de/serialization, that means, if we switch to JSON, and then later SKON is found to be suitable, the changeover from JSON to SKON will be fairly trivial, as the methods to de/serialize, are similar enough that it should simply require changing a few method names and object types. Whereas the changeover from XML to JSON (or SKON) is much more complex (where it uses the very awkward XMLreader). It would be less overall work changing to JSON as soon as possible, even if we eventually change over to SKON, as any new things implemented that need to read data will most likely be implemented in XML as that's what the bulk of the system is still on, meaning the changeover will be the more difficult XML -> (JSON or SKON) instead of the much easier JSON to SKON. |
For reference as of the day this was posted here is a list of the .xml files in PP:
|
And /Assets/SteramingAssets/Data/SettingsTemplate.xml. (For the settingsMenu, which isn't on master yet) |
as well as the localization config. |
So it's been talked about that we need to migrate away from XML. The obvious alternative is JSON, however SKON, which was created specifically for ProjectPorcupine is also a valid, although less stable alternative.
I would like to start woking on this, however I don't want to port everything to JSON, then SKON would be ready, then have to re-port everything to SKON. IMO it would be better to wait for SKON to be ready than to port it to JSON now.
If SKON or SKON.NET is not yet ready, is there some issues we can track before this can be implemented?
@NogginBops already started work on porting some of the XML sprites to SKON, you can see his commit here: NogginBops/ProjectPorcupine@79f909a and the branch: NogginBops/ProjectPorcupine/skon-sprites
I would be willing to start porting the localization to SKON, as I'm already quite familiar with that section of the codebase.
Pings @NogginBops @longtomjr
Links:
https://github.com/SpaceKrakens/SKON SKON
https://github.com/SpaceKrakens/SKON.NET SKON .NET Parser
The text was updated successfully, but these errors were encountered: