Closed blackwinter closed 2 years ago
@blackwinter please merge
So we're not going to discuss the intrinsic relationship between the two modules? Are we content with the duplication?
So we're not going to discuss the intrinsic relationship between the two modules? Are we content with the duplication?
You are right. We got confused about where we are in the process. @fsteeg will review.
we can always extract a superclass later, when/if we see that we're actually building/fixing stuff in both modules.
Well, let's hope we don't forget... :slightly_smiling_face:
Well, let's hope we don't forget... :slightly_smiling_face:
One could argue that we should wait for supporting a third JSON-like format before we even consider extracting it: https://en.wikipedia.org/wiki/Rule_of_three_(computer_programming)
Based off of JSON module. But not every feature of the JSON implementation can be (easily/reasonably) supported in the YAML implementation (decoder: optional comments, JsonPath; encoder: root value separator, (optional) pretty printing).
Maybe there's room for consolidation, though, with YAML being a superset of JSON. Both pairs of classes could (should?) have a common superclass implementing the actual decoding/encoding.
Fixes #399.