GenericSYB don't parse constructor with no args #62

Closed
jutaro opened this Issue Jan 12, 2012 · 2 comments

3 participants

@jutaro

When I have
data CommandForBench = BenchCommandConnectGUI
decode (encode BenchCommandConnectGUI) gives Nothing.

When I change to
data CommandForBench = BenchCommandConnectGUI ()
everything works as expected.

Cheers
Jürgen

@basvandijk basvandijk was assigned Jan 13, 2012
@basvandijk basvandijk added a commit that closed this issue Jan 14, 2012
@basvandijk basvandijk Fixed #62.
Nullary constructors are encoded as an empty array.
The syb code wrongfully assumed they were encoded as Null.
49befca
@bos
Owner

Thanks, @basvandijk!

@jutaro
@tolysz tolysz pushed a commit to tolysz/aeson that referenced this issue May 18, 2015
@basvandijk basvandijk Fixed #62.
Nullary constructors are encoded as an empty array.
The syb code wrongfully assumed they were encoded as Null.
613cf61
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment