FghjNode.add

Adds data to the object-tree recursively.

struct FghjNode
pure
void
add

Examples

import fghj;
auto text = `{"foo":"bar","inner":{"a":true,"b":false,"c":"32323","d":null,"e":{}}}`;
auto addition = `{"do":"re","inner":{"a":false,"u":2}}`;
auto root = FghjNode(text.parseJson);
root.add(addition.parseJson);
auto result = `{"do":"re","foo":"bar","inner":{"a":false,"u":2,"b":false,"c":"32323","d":null,"e":{}}}`;
assert(root == FghjNode(result.parseJson));

Meta