* Newbie GNATCOLL question
@ 2019-10-29 12:54 reinert
0 siblings, 0 replies; only message in thread
From: reinert @ 2019-10-29 12:54 UTC (permalink / raw)
Hi,
GNATCOLL.JSON question:
I want to test if an object "state" (JSON_Value) is like "{"name":"blabla"}"
which is almost an empty (sub-)object and which I want to avoid to include
in the (super-)object "cell".
The following code/hack works:
------------------------------------------------------------
declare
a : constant JSON_Value := Clone(state);
begin
a.unset_field(Field_Name => "name");
if not a.is_empty then
cell.Set_Field(Field_Name => "state",Field => state);
end if;
end;
-------------------------------------------------------------
I assume this is clumsy. Is there a shorter way?
reinert
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2019-10-29 12:54 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-29 12:54 Newbie GNATCOLL question reinert
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox