[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] json: Add support for encoding structs

From: Ted Zlatanov
Subject: Re: [PATCH] json: Add support for encoding structs
Date: Mon, 24 Apr 2017 15:17:08 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux)

On Mon, 24 Apr 2017 23:24:13 +0530 Vibhav Pant <address@hidden> wrote: 

>> Is it possible to also exclude fields with :json nil? I think that's
>> very useful.
VP> That would mean that all struct field will have to be explicitly declared
VP> with a :json option to not be ignored. Instead, I've added a :json-ignore
VP> option that makes json-encode-struct ignore the slot ignore it when it's
VP> non-nil.

Oh, right! Thank you for contributing this nice improvement. I look
forward to using it.

I also want to ask if the keywords could be less JSON-specific, since
other serializers could be used. So you'd use keywords like
:serialize-field, :serialize-ignore, :serialize-to-type instead of the
ones you proposed.

Finally, maybe we could also consider using the existing facility
:print-function (the manual says that's currently unused). But I don't
know the full implications of that, so maybe it's a bad suggestion.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]