bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#41946: 27.0.91; native json parsing: add :empty-object configuration


From: Lars Ingebrigtsen
Subject: bug#41946: 27.0.91; native json parsing: add :empty-object configuration
Date: Wed, 04 Aug 2021 07:55:04 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Dmitry Gutov <dgutov@yandex.ru> writes:

> On 31.07.2021 19:12, Lars Ingebrigtsen wrote:
>> You can wrap the json calls with a function that flips nil/:empty-object
>> easy enough, can't you?
>
> By copying the object tree and substituting nil for something else
> recursively?
>
> That says "more GC" to me, which can be a problem when the structure
> is big enough.

The user didn't want to rewrite the code to alter some conditionals, and
instead wanted Emacs to be changed so that they didn't have to do that.
I pointed out that the user can trivially just pre-process the data if
they didn't want to rewrite those conditionals.

(And they can just modify the structure in place if GC's a concern.)

I think the conclusion here is that we don't want to add :empty-object
to json.c, so I'm closing this bug report.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





reply via email to

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