Show / Hide Table of Contents

Class JsonManifestModelSerializerExtensions

Extension methods for ISerializesManifestModelToFromJson.

Inheritance
System.Object
JsonManifestModelSerializerExtensions
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 static class JsonManifestModelSerializerExtensions

Methods

| Improve this Doc View Source

DeserializeManifestModelAsync(ISerializesManifestModelToFromJson, String, CancellationToken)

Deserializes a string of JSON text into a manifest model Value.

Declaration
public static Task<Value> DeserializeManifestModelAsync(this ISerializesManifestModelToFromJson serializer, string jsonString, CancellationToken token = default(CancellationToken))
Parameters
Type Name Description
ISerializesManifestModelToFromJson serializer

The JSON manifest model serializer.

System.String jsonString

A string of JSON text.

System.Threading.CancellationToken token

An optional cancellation token.

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

A manifest model value.

Remarks

The string must be encoded in UTF-8.

| Improve this Doc View Source

SerializeManifestModelAsync(ISerializesManifestModelToFromJson, Value, CancellationToken)

Serializes the specified manifest model Value to a string.

Declaration
public static async Task<string> SerializeManifestModelAsync(this ISerializesManifestModelToFromJson serializer, Value value, CancellationToken token = default(CancellationToken))
Parameters
Type Name Description
ISerializesManifestModelToFromJson serializer

The JSON manifest model serializer.

Value value

A manifest model value to be serialized.

System.Threading.CancellationToken token

An optional cancellation token.

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

A UTF-8 string which contains the serialized JSON.

  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX