# adomorn/structuredjson architecture

> Architecture diagram of the GitHub repository adomorn/structuredjson, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-28). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/adomorn/structuredjson
- Repository: https://github.com/adomorn/structuredjson

## Overview

StructuredJson is a .NET library for editing nested JSON objects through escaped property and array-index paths. A caller creates an instance from JSON or starts empty, then uses path-based operations to set, read, query, remove, and enumerate values; results can be serialized back to JSON. The core class coordinates path parsing, an in-memory value tree, and configurable conversion and structural limits. The map reflects the README and sampled runtime source; unsampled implementation details are omitted.

Main entry points: [`StructuredJson/StructuredJson.cs`](https://github.com/adomorn/structuredjson/blob/development/StructuredJson/StructuredJson.cs) (StructuredJson API), [`StructuredJson/StructuredJsonOptions.cs`](https://github.com/adomorn/structuredjson/blob/development/StructuredJson/StructuredJsonOptions.cs) (Options and limits), [`StructuredJson/ValueTree.cs`](https://github.com/adomorn/structuredjson/blob/development/StructuredJson/ValueTree.cs) (Value tree), [`StructuredJson/NumberHandlingPolicy.cs`](https://github.com/adomorn/structuredjson/blob/development/StructuredJson/NumberHandlingPolicy.cs) (Number handling)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Library runtime"]
  node_api["StructuredJson API<br/>[StructuredJson.cs]"]
  node_options["Options and limits"]
  node_paths["Path parser<br/>[PathParser.cs]"]
  node_tree["Value tree<br/>[ValueTree.cs]"]
  node_numberpolicy["Number handling"]
  node_finite["Finite converters"]
end

node_caller(("C&#35; caller"))
node_jsoninput["JSON input"]
node_jsonoutput["JSON output"]

node_caller -->|"calls operations"| node_api
node_jsoninput -->|"constructs from"| node_api
node_api -->|"snapshots settings"| node_options
node_api -->|"parses paths"| node_paths
node_api -->|"imports, exports"| node_tree
node_api -->|"serializes tree"| node_jsonoutput
node_tree -->|"escapes keys"| node_paths
node_options -->|"configures converters"| node_numberpolicy
node_numberpolicy -->|"registers converters"| node_finite

click node_api "https://github.com/adomorn/structuredjson/blob/development/StructuredJson/StructuredJson.cs"
click node_options "https://github.com/adomorn/structuredjson/blob/development/StructuredJson/StructuredJsonOptions.cs"
click node_paths "https://github.com/adomorn/structuredjson/blob/development/StructuredJson/PathParser.cs"
click node_tree "https://github.com/adomorn/structuredjson/blob/development/StructuredJson/ValueTree.cs"
click node_numberpolicy "https://github.com/adomorn/structuredjson/blob/development/StructuredJson/NumberHandlingPolicy.cs"
click node_finite "https://github.com/adomorn/structuredjson/blob/development/StructuredJson/FiniteNumberConverters.cs"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_api,node_options,node_paths,node_tree,node_numberpolicy,node_finite toneBlue
class node_caller,node_jsoninput,node_jsonoutput toneIndigo
```

## Components

### Library runtime

- [StructuredJson API](https://github.com/adomorn/structuredjson/blob/development/StructuredJson/StructuredJson.cs): `StructuredJson/StructuredJson.cs`
- [Options and limits](https://github.com/adomorn/structuredjson/blob/development/StructuredJson/StructuredJsonOptions.cs): `StructuredJson/StructuredJsonOptions.cs`
- [Path parser](https://github.com/adomorn/structuredjson/blob/development/StructuredJson/PathParser.cs): `StructuredJson/PathParser.cs`
- [Value tree](https://github.com/adomorn/structuredjson/blob/development/StructuredJson/ValueTree.cs): `StructuredJson/ValueTree.cs`
- [Number handling](https://github.com/adomorn/structuredjson/blob/development/StructuredJson/NumberHandlingPolicy.cs): `StructuredJson/NumberHandlingPolicy.cs`
- [Finite converters](https://github.com/adomorn/structuredjson/blob/development/StructuredJson/FiniteNumberConverters.cs): `StructuredJson/FiniteNumberConverters.cs`

### Other components

- **C# caller**
- **JSON input**
- **JSON output**

## Connections

- C# caller → StructuredJson API: calls operations
- JSON input → StructuredJson API: constructs from
- StructuredJson API → Options and limits: snapshots settings
- StructuredJson API → Path parser: parses paths
- StructuredJson API → Value tree: imports, exports
- StructuredJson API → JSON output: serializes tree
- Value tree → Path parser: escapes keys
- Options and limits → Number handling: configures converters
- Number handling → Finite converters: registers converters
