purescript-contrib / purescript-argonaut-codecs

JSON serialization and deserialization with Argonaut.
MIT License
48 stars 46 forks source link

An instance for nested tuples? #99

Open ursi opened 3 years ago

ursi commented 3 years ago

I recently figured out how to get nested tuples to encode and decode as JSON arrays e.g.

1 /\ "hi" /\ [ true ] /\ { a: 0 } -> [ 1, "hi", [ true ], { "a": 0 } ]

I did this for simple-json but I'm pretty sure the approach would work here as well. Unexpectedly to me, the PR was not accepted. In light of that, I figured I'd ask if this would be a welcome addition before I put in the work.