YamlDocument.ConvertToJsonString Method
Definition
Namespace: Corvus.Text.Json.Yaml
Assembly: Corvus.Text.Json.dll
Overloads
ConvertToJsonString(ReadOnlyMemory<byte>, YamlReaderOptions)
Converts UTF-8 YAML bytes to a JSON string.
public static string ConvertToJsonString(ReadOnlyMemory<byte> utf8Yaml, YamlReaderOptions options)
Parameters
Returns
string
A string containing the JSON representation of the YAML content.
Exceptions
Applies To
| Product |
Versions |
| .NET |
9, 10 |
| .NET Standard |
2.0, 2.1 |
ConvertToJsonString(string, YamlReaderOptions)
Converts a YAML string to a JSON string.
public static string ConvertToJsonString(string yaml, YamlReaderOptions options)
Parameters
| Name |
Type |
Description |
yaml |
string |
The YAML content as a string. |
options |
YamlReaderOptions |
Optional YAML reader options. (optional) |
Returns
string
A string containing the JSON representation of the YAML content.
Exceptions
Applies To
| Product |
Versions |
| .NET |
9, 10 |
| .NET Standard |
2.0, 2.1 |
Collaborate with us on GitHub
The source for this content can be found on GitHub, where you can also create and review issues and pull requests.
Open an issue