Show / Hide Table of Contents

Interface ISerializesManifestModelToFromJson

An object which can serialize & deserialize a Value to or from JSON.

Namespace: CSF.Validation
Assembly: CSF.Validation.Json.dll
Syntax
public interface 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
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
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.

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