[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: |
Tue, 25 Apr 2017 10:26:28 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) |
On Tue, 25 Apr 2017 18:10:59 +0530 Vibhav Pant <address@hidden> wrote:
VP> On Tue, Apr 25, 2017 at 4:22 AM, Davis Herring <address@hidden> wrote:
>> You could use :json "" or :json 'ignore as the special value.
VP> IIRC, the empty string is a valid JSON key (`JSON.parse(`{"":1}`)`
VP> works in JS).
VP> Symbols are also considered a valid type according to
VP> `json-encode-key'.
Maybe one way is to distinguish '(:serialize-field nil) from '() by
checking with memq for the key?
On Tue, 25 Apr 2017 17:57:22 +0530 Vibhav Pant <address@hidden> wrote:
>> 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.
VP> Wouldn't that restrict encoding only to JSON?, I think passing all
VP> (json) encoding through json.el would be a better design.
Yeah, it's not a great suggestion :)
Thanks for all the work.
Ted
- [PATCH] json: Add support for encoding structs, Vibhav Pant, 2017/04/23
- Re: [PATCH] json: Add support for encoding structs, Ted Zlatanov, 2017/04/24
- Re: [PATCH] json: Add support for encoding structs, Vibhav Pant, 2017/04/24
- Re: [PATCH] json: Add support for encoding structs, Ted Zlatanov, 2017/04/24
- Re: [PATCH] json: Add support for encoding structs, Ted Zlatanov, 2017/04/24
- Re: [PATCH] json: Add support for encoding structs, Stefan Monnier, 2017/04/24
- Re: [PATCH] json: Add support for encoding structs,
Ted Zlatanov <=
- Re: [PATCH] json: Add support for encoding structs, Vibhav Pant, 2017/04/25
- Re: [PATCH] json: Add support for encoding structs, Ted Zlatanov, 2017/04/25
- Re: [PATCH] json: Add support for encoding structs, Stefan Monnier, 2017/04/26
- Re: [PATCH] json: Add support for encoding structs, Vibhav Pant, 2017/04/27
- Re: [PATCH] json: Add support for encoding structs, Stefan Monnier, 2017/04/27
- Re: [PATCH] json: Add support for encoding structs, Vibhav Pant, 2017/04/25
- Re: [PATCH] json: Add support for encoding structs, Davis Herring, 2017/04/24
- Re: [PATCH] json: Add support for encoding structs, Vibhav Pant, 2017/04/25
Re: [PATCH] json: Add support for encoding structs, Clément Pit-Claudel, 2017/04/24