Caution
If you pass a parent but fail to add this new node to the parent's Children
collection, bad things will likely happen.
public JsonNode(
JsonNode? parent
)Note that if this is not to be the root node of a new DOM (i.e. if parent is not null), even though the calling code has passed in parent, it is nevertheless still the caller's responsibility to add this node to the Children collection of the parent JsonNode, because only the calling code can know whether there is any significance to the order in which the children are arranged (see Children).
Note also that with this choice of constructor, any subsequent calls to this object's ItemString operator for a specifically named child node while multiple children exist with the specified name, will cause a JsonNodeDuplicateSiblingNameException.