I agree we should keep higher-level solutions in mind, however, I've barely mentioned the problem I'm trying to solve so I don't know how others could think they know the "right" solution to it. It did feel a bit unsolicited in that regard since this isn't a help forum, and like nick said I thought my question stood properly on its own. Anyway, my original post was confusing and brought attention to the wrong things, I edited it to be more clear, sorry for that!
Jon: those are great points, I can definitely understand not wanting this as part of the default JSON**coder
behavior since it's difficult to make a one-size-fits-all solution and there are other performance tasks to focus on. The problem is that I can't implement my own that conforms to the current Decoder
and Encoder
protocols.
Is it possible to tweak the Decoder
and Encoder
protocols to support more use cases? Maybe this discussion is more about evaluating the current state of those protocols.