Closed sschuberth closed 9 months ago
I'm not sure if it would be more convenient than simply sorting your data before serializing. I guess for bigger structures it could be?
How do you propose it would work?
I guess for bigger structures it could be?
Yes, and for immutable data class hierarchies you don't want to create copies just to sort a deeply nested collection for serialization. In memory, the order does not matter. This is just for readability and canonization in the serialized format.
How do you propose it would work?
Similar to these, but more generically implemented.
Okay, sure! Would you like to contribute it?
Maybe, yes, eventually 😀 I doesn't have high priority for me currently, though.
In serialized formats, it's often nice for a better overview to have collection entries sorted naturally / alphabetically / by some comparator. So what do you guys think about adding convenience serializers to do that?