jerkson
jerkson copied to clipboard
#22 - better serialisation for Tuples
Serialise tuples as:
[1, "two", 3.0]
rather than:
{ "_1": 1, "_2": "two", "_3": 3.0 }
I haven't tested this yet, but it looks great to me. Could you do us a favour and write a test that proves that tuples serialized the old-fashioned way (e.g. { "_1": "foo", "_2": "bar" }) will still deserialize to tuples after your change?
Good catch. This version won't fall back to deserializing those tuples. I've made the change in josephw/jerkson@bc2b8360c9e6b561e6c4dec1afd2724c038da5d2, but I'm hitting an NPE constructing the fallback CaseClassDeserializer.