jsonpak icon indicating copy to clipboard operation
jsonpak copied to clipboard

Handle empty JsonTrees

Open planetis-m opened this issue 2 years ago • 2 comments

planetis-m avatar Mar 29 '24 19:03 planetis-m

I think the only way to handle this is to have a default field: JsonTree.nodes = @[Node(opcodeNull)] Everything else seems too much hassle. jsonpak/[parser, mapper] need adjustments. But since this allocates I will leave it as is for now, until I figure out the cost.

planetis-m avatar Mar 29 '24 21:03 planetis-m

We have both tree.isEmpty() and newEmptyTree() this is not needed for now.

planetis-m avatar Mar 31 '24 19:03 planetis-m