Skip to content

Suggestion: document how to work with non-read-only equivalent of JsonDocument #24252

Closed
@konrad-jamrozik

Description

@konrad-jamrozik

From the article:

System.Text.Json.JsonDocument provides the ability to build a read-only Document Object Model (DOM)

Suggestion: explain what I am supposed to do if I want to have a non-read-only DOM.

Example use case: as input I have multiple objects, and json strings. I want to represent all the strings and objects as structured jsons (like JsonDocument), to compose them into one bigger json, and convert it to json string.

For example, imagine I have multiple json configuration files which I want to compose into one bigger json configuration file, where the input configuration files will be nested as json property values into the output json config file. I do not want to introduce any types to represent the constituent config files. Instead, I want to keep the composition logic generic.

Related items:

Related Stack Overflow question:
https://stackoverflow.com/questions/58694837/system-text-json-merge-two-objects


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions