YamlDocument.ConvertToYaml Method
Definition
Namespace: Corvus.Yaml
Assembly: Corvus.Text.Json.dll
Overloads
| Method |
Description |
| ConvertToYaml(JsonElement, IBufferWriter<byte>, YamlWriterOptions) |
Converts a JsonElement to YAML, writing the output to the specified... |
| ConvertToYaml(JsonElement, Stream, YamlWriterOptions) |
Converts a JsonElement to YAML, writing the output to the specified... |
| ConvertToYaml(string, IBufferWriter<byte>, YamlWriterOptions) |
Converts a JSON string to YAML, writing the output to the specified IBufferWriter. |
| ConvertToYaml(ReadOnlySpan<byte>, IBufferWriter<byte>, YamlWriterOptions) |
Converts UTF-8 JSON bytes to YAML, writing the output to the specified IBufferWriter. |
| ConvertToYaml(string, Stream, YamlWriterOptions) |
Converts a JSON string to YAML, writing the output to the specified Stream. |
| ConvertToYaml(ReadOnlySpan<byte>, Stream, YamlWriterOptions) |
Converts UTF-8 JSON bytes to YAML, writing the output to the specified Stream. |
ConvertToYaml(JsonElement, IBufferWriter<byte>, YamlWriterOptions)
Converts a JsonElement to YAML, writing the output to the specified IBufferWriter.
public static void ConvertToYaml(JsonElement element, IBufferWriter<byte> writer, YamlWriterOptions options)
Parameters
Applies To
| Product |
Versions |
| .NET |
9, 10 |
| .NET Standard |
2.0, 2.1 |
ConvertToYaml(JsonElement, Stream, YamlWriterOptions)
Converts a JsonElement to YAML, writing the output to the specified Stream.
public static void ConvertToYaml(JsonElement element, Stream utf8Stream, YamlWriterOptions options)
Parameters
| Name |
Type |
Description |
element |
JsonElement |
The JSON element to convert. |
utf8Stream |
Stream |
The stream to write the UTF-8 YAML output to. |
options |
YamlWriterOptions |
Optional YAML writer options. (optional) |
Applies To
| Product |
Versions |
| .NET |
9, 10 |
| .NET Standard |
2.0, 2.1 |
ConvertToYaml(string, IBufferWriter<byte>, YamlWriterOptions)
Converts a JSON string to YAML, writing the output to the specified IBufferWriter.
public static void ConvertToYaml(string json, IBufferWriter<byte> writer, YamlWriterOptions options)
Parameters
Applies To
| Product |
Versions |
| .NET |
9, 10 |
| .NET Standard |
2.0, 2.1 |
ConvertToYaml(ReadOnlySpan<byte>, IBufferWriter<byte>, YamlWriterOptions)
Converts UTF-8 JSON bytes to YAML, writing the output to the specified IBufferWriter.
public static void ConvertToYaml(ReadOnlySpan<byte> utf8Json, IBufferWriter<byte> writer, YamlWriterOptions options)
Parameters
Applies To
| Product |
Versions |
| .NET |
9, 10 |
| .NET Standard |
2.0, 2.1 |
ConvertToYaml(string, Stream, YamlWriterOptions)
Converts a JSON string to YAML, writing the output to the specified Stream.
public static void ConvertToYaml(string json, Stream utf8Stream, YamlWriterOptions options)
Parameters
| Name |
Type |
Description |
json |
string |
The JSON content as a string. |
utf8Stream |
Stream |
The stream to write the UTF-8 YAML output to. |
options |
YamlWriterOptions |
Optional YAML writer options. (optional) |
Applies To
| Product |
Versions |
| .NET |
9, 10 |
| .NET Standard |
2.0, 2.1 |
ConvertToYaml(ReadOnlySpan<byte>, Stream, YamlWriterOptions)
Converts UTF-8 JSON bytes to YAML, writing the output to the specified Stream.
public static void ConvertToYaml(ReadOnlySpan<byte> utf8Json, Stream utf8Stream, YamlWriterOptions options)
Parameters
| Name |
Type |
Description |
utf8Json |
ReadOnlySpan<byte> |
The UTF-8 encoded JSON bytes. |
utf8Stream |
Stream |
The stream to write the UTF-8 YAML output to. |
options |
YamlWriterOptions |
Optional YAML writer options. (optional) |
Applies To
| Product |
Versions |
| .NET |
9, 10 |
| .NET Standard |
2.0, 2.1 |