jerkson icon indicating copy to clipboard operation
jerkson copied to clipboard

#22 - better serialisation for Tuples

Open josephw opened this issue 12 years ago • 2 comments

Serialise tuples as:

[1, "two", 3.0]

rather than:

{ "_1": 1, "_2": "two", "_3": 3.0 }

josephw avatar Jun 14 '12 13:06 josephw

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?

acruise avatar Jul 27 '12 17:07 acruise

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.

josephw avatar Jul 29 '12 05:07 josephw