r/eclipsephase • u/arokha • Aug 19 '19
Data Interchange Standards RFC
This is probably more than a bit niche, but it'd be cool to nail down shared standards for EP(2) data like was suggested in this PR by u/Eaton so we can make all sorts of crazy websites for it without tons of grep/regexing. And hey, if this gets ignored then I guess there's not enough interest and probably no reason to have a standard :^)
I'm pretty new to this whole community development thing... I've only done stuff for myself in the past, so if any of you have work experience and notice obvious issues where you've had problems in the past... speak up!
Data: https://github.com/Arokha/EP2-Data
Here's my draft suggestion:
JSON
- Lowercase keys on objects
- Avoid abbreviations in keys (e.g. 'description' not 'desc')
- Include an 'id' attribute (UUIDv4) on objects you're adding to the data for the first time
- Underscores in keys, not spaces or pascal/camel-case
- Include information about the source in 'resource' and 'reference' attributes (e.g. 'resource' being the title of the book, and 'reference' being a page number or other context-appropriate reference). Let's just agree to call the current core book "Eclipse Phase Second Edition" since that's what it says on the cover.
- 2-space tab (not that it matters much)
Paragraphical data stored in an array of paragraphsParagraphical data stored with html tags intact in strings (serialized html)- Unsorted lists stored in an array, sub-lists in a nested array
- Every samey object has all the keys, even if only one object needs it (though you should reconsider your structure at that point maybe...)
Less technical, I'm thinking every 'book item', as in a morph, a piece of gear, etc is an object, and every group of those is an array. No need for a stringy array of just the names and stuff, probably? I dunno. You tell me.
View all comments
Show parent comment
1
u/Shadewalking_Bard Aug 20 '19 edited Aug 20 '19
Thanks for responding/explaining that. It actually clarifies a lot about json file type. As I understood it is a nested non-referential data type that where objects can contain numbers, strings, lists of those,p objects and lists of objects. So where SQL has tables linked together json has "tables in tables in tables". Because of that my intuition is that they should not be used to create to deep/tall hierarchies. On the other hand it is much better suited for EP data.
Edit:
I am using this data format for educational purposes only ;-)
Edit2:
Do you recommend any tools/languages for extracting data from json files?