Class MoneyConverter

Converts a Money object to json and back.

Inheritance
System.Object
MoneyConverter
Namespace: EPiServer.Commerce.Serialization.Json
Assembly: EPiServer.Business.Commerce.dll
Version: 10.8.0
Syntax
public class MoneyConverter : JsonConverter

Constructors

MoneyConverter()

Declaration
public MoneyConverter()

Properties

CanWrite

Gets a value indicating whether this Newtonsoft.Json.JsonConverter can write JSON.

Declaration
public override bool CanWrite { get; }
Property Value
Type Description
System.Boolean

Always false.

Methods

CanConvert(Type)

Determines whether this converter can convert the specified object type.

Declaration
public override bool CanConvert(Type objectType)
Parameters
Type Name Description
System.Type objectType

Type of the object.

Returns
Type Description
System.Boolean

true if this converter can convert the specified object type; otherwise, false.

ReadJson(JsonReader, Type, Object, JsonSerializer)

Deserializes a Money instance from json.

Declaration
public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer)
Parameters
Type Name Description
Newtonsoft.Json.JsonReader reader

The reader.

System.Type objectType

Type of the object.

System.Object existingValue

The existing value.

Newtonsoft.Json.JsonSerializer serializer

The serializer.

Returns
Type Description
System.Object

The currency.

WriteJson(JsonWriter, Object, JsonSerializer)

Not implemented.

Declaration
public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer)
Parameters
Type Name Description
Newtonsoft.Json.JsonWriter writer

The writer.

System.Object value

The value.

Newtonsoft.Json.JsonSerializer serializer

The serializer.