Show / Hide Table of Contents

Class JsonStreamComponentConverter<T>

Common converter to support deserialization of non-resource FHIR components.

Inheritance
System.Object
JsonStreamComponentConverter<T>
Namespace: fhirCsR2.Serialization
Assembly: fhirCsR2.dll
Syntax
public class JsonStreamComponentConverter<T> : JsonConverter<T> where T : IFhirJsonSerializable, new()
Type Parameters
Name Description
T

Methods

| Improve this Doc View Source

CanConvert(Type)

Determines whether the specified type can be converted.

Declaration
public override bool CanConvert(Type objectType)
Parameters
Type Name Description
Type objectType
Returns
Type Description
System.Boolean
| Improve this Doc View Source

ComponentRead(ref Utf8JsonReader, Type, JsonSerializerOptions)

Read override to handle reading of components (to allow for open reader).

Declaration
public static T ComponentRead(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
Parameters
Type Name Description
Utf8JsonReader reader
Type typeToConvert
JsonSerializerOptions options
Returns
Type Description
T
| Improve this Doc View Source

Read(ref Utf8JsonReader, Type, JsonSerializerOptions)

Reads and converts the JSON to a typed object.

Declaration
public override T Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
Parameters
Type Name Description
Utf8JsonReader reader
Type typeToConvert
JsonSerializerOptions options
Returns
Type Description
T
| Improve this Doc View Source

Write(Utf8JsonWriter, T, JsonSerializerOptions)

Writes a specified value as JSON.

Declaration
public override void Write(Utf8JsonWriter writer, T component, JsonSerializerOptions options)
Parameters
Type Name Description
Utf8JsonWriter writer
T component
JsonSerializerOptions options
  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX