Show / Hide Table of Contents

Class JsonManifestModelSerializer

Default implementation of ISerializesManifestModelToFromJson which uses System.Text.Json.

Inheritance
System.Object
JsonManifestModelSerializer
Implements
ISerializesManifestModelToFromJson
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: CSF.Validation
Assembly: CSF.Validation.Json.dll
Syntax
public class JsonManifestModelSerializer : ISerializesManifestModelToFromJson

Methods

| Improve this Doc View Source

DeserializeManifestModelAsync(Stream, CancellationToken)

Deserializes a stream containing UTF-8 encoded JSON text into a manifest model Value.

Declaration
public Task<Value> DeserializeManifestModelAsync(Stream jsonStream, CancellationToken token = default(CancellationToken))
Parameters
Type Name Description
System.IO.Stream jsonStream

A stream containing JSON text.

System.Threading.CancellationToken token

An optional cancellation token.

Returns
Type Description
System.Threading.Tasks.Task<Value>

A manifest model value.

| Improve this Doc View Source

SerializeManifestModelAsync(Value, Stream, CancellationToken)

Serializes the specified manifest model Value to the specified destinationStream, with UTF-8 encoding.

Declaration
public Task SerializeManifestModelAsync(Value value, Stream destinationStream, CancellationToken token = default(CancellationToken))
Parameters
Type Name Description
Value value

A manifest model value to be serialized.

System.IO.Stream destinationStream

A writable stream which shall serve as the destination of the JSON text.

System.Threading.CancellationToken token

An optional cancellation token.

Returns
Type Description
System.Threading.Tasks.Task

A task which completes when the serialization is done.

Implements

ISerializesManifestModelToFromJson

Extension Methods

JsonManifestModelSerializerExtensions.DeserializeManifestModelAsync(ISerializesManifestModelToFromJson, String, CancellationToken)
JsonManifestModelSerializerExtensions.SerializeManifestModelAsync(ISerializesManifestModelToFromJson, Value, CancellationToken)
  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX