Closed NickCondron closed 1 year ago
This approach is unfortunately inconsistent with Peppi's round-trip goal. (I should really write down Peppi's goals somewhere.)
The Spec can be really frustrating at times. Fizzi himself has said 'metadata was a mistake'. If the spec is bad and non-exhaustive, we should fix the spec. Figuring out which fields are undocumented wouldn't be too hard. Fields can be added/changed in later versions, but we already admit that future versions break our round-tripping guarantees. We could store ordering information and/or information about timestamp formats... Maybe it isn't worth the effort.
I'll think about it some more. There's still changes in this PR worth keeping otherwise.
I like the Platform enum and removing the defunct JMESPath code. Could you split them into their own PRs?
I don't like the metadata_raw
renaming. When someone serializes a game to JSON (e.g. via peppi-slp), I want them to get the exact same metadata as what's in the file.
Closing in favor of two separate PRs as requested. Starting with #36. Platform will be added afterwards because it conflicts.
Platform
enum to represent possible platforms properlymetadata_raw
intoMetadata.raw
EDIT: I dropped the parts of this PR related to implementing serialization on metadata directly due to the concerns raised below. I don't think the issues are insurmountable, but it's probably a low-priority issue and/or is blocked by issues with the spec.