Table of Contents

Class CustomPointOfCareConverter

Namespace
adas_core.Infrastructure.Utils
Assembly
adas-core.Infrastructure.dll

Provides a custom JSON conversion implementation for point of care data, extending the base Newtonsoft.Json.JsonConverter functionality.

public class CustomPointOfCareConverter : JsonConverter
Inheritance
JsonConverter
CustomPointOfCareConverter
Inherited Members
JsonConverter.CanRead
JsonConverter.CanWrite
Extension Methods

Remarks

This converter is designed to handle the serialization and deserialization logic specific to point of care entities, tailoring the behavior inherited from the Newtonsoft.Json.JsonConverter base class.

Methods

CanConvert(Type)

Determines whether the converter can convert the specified type. Returns true only when the supplied type is PointOfCare; otherwise, returns false.

public override bool CanConvert(Type objectType)

Parameters

objectType Type

The type to evaluate for convertibility.

Returns

bool

true if objectType equals PointOfCare; otherwise, false.

ReadJson(JsonReader, Type, object?, JsonSerializer)

Reads the JSON representation of the object.

public override object ReadJson(JsonReader reader, Type objectType, object? existingValue, JsonSerializer serializer)

Parameters

reader JsonReader

The Newtonsoft.Json.JsonReader to read from.

objectType Type

Type of the object.

existingValue object

The existing value of object being read.

serializer JsonSerializer

The calling serializer.

Returns

object

The object value.

WriteJson(JsonWriter, object?, JsonSerializer)

Writes the JSON representation of the object.

public override void WriteJson(JsonWriter writer, object? value, JsonSerializer serializer)

Parameters

writer JsonWriter

The Newtonsoft.Json.JsonWriter to write to.

value object

The value.

serializer JsonSerializer

The calling serializer.