Table of Contents

Method ToJsonNode

Namespace
OpenCvSharp
Assembly
OpenCvSharp.dll

ToJsonNode()

Converts this node (and, recursively, its children) into a JsonNode tree, regardless of whether the underlying FileStorage was opened as XML, YAML or JSON. This is a generic structural conversion (scalars, sequences, mappings) - it does not give special treatment to OpenCV-specific encodings such as Mat/KeyPoint/ DMatch, which come through as their raw mapping/sequence shape (e.g. a Mat becomes a JSON object with "rows"/"cols"/"dt"/"data" members, not an Mat). The result can be fed to JsonSerializer or queried directly.

public JsonNode? ToJsonNode()

Returns

JsonNode

The converted node, or null for a None node (mirroring JSON null).