jerkson icon indicating copy to clipboard operation
jerkson copied to clipboard

Support for Tuples?

Open lambdaknight opened this issue 13 years ago • 8 comments

Right now, Tuples are not supported by Jerkson, though it seems like they could easily be added. Your CaseClassSerializer/Deserializer classes are remarkably close to what is needed.

lambdaknight avatar Jun 22 '11 17:06 lambdaknight

Patches accepted.

codahale avatar Jun 22 '11 18:06 codahale

FWIW, what makes this hard is that you'd need a deserializer for Tuple1 through Tuple22, or one big deserializer with a huge switch on arity. It's not a pressing need for me right now, but if someone else wants to take this on I'd merge it and maintain it.

codahale avatar Sep 15 '11 20:09 codahale

I think it's pretty awesome that this is issue #22.

acruise avatar Sep 15 '11 20:09 acruise

Also, what would they look like? { "_1": 1, "_2": "two", "_3": 3.0 } ?

acruise avatar Sep 15 '11 20:09 acruise

Oh, hell no.

[1, "two", 3.0]

Coda Hale http://codahale.com

On Thursday, September 15, 2011 at 1:49 PM, Alex Cruise wrote:

Also, what would they look like? { "_1": 1, "_2": "two", "_3": 3.0 } ?

Reply to this email directly or view it on GitHub: https://github.com/codahale/jerkson/issues/22#issuecomment-2109047

codahale avatar Sep 15 '11 20:09 codahale

This should be open now, given the revert, correct?

I'm very interested in getting this to work for Jerkson. Can you clarify how d592703 with 2.9.1 enables this scenario? I tried applying the commit, but it didn't seem to fix the problem for tuples.

belindagu avatar Sep 30 '11 08:09 belindagu

That commit was indeed unrelated.

codahale avatar Sep 30 '11 08:09 codahale

I've attempted an implementation of this as josephw/jerkson@c189f6cb0b69c4a035fb3618724e6927c25c98f7 and opened a pull request.

josephw avatar Jul 26 '12 12:07 josephw