Class DateTimeOffsetJsonConverter
Newtonsoft: Implements a type converter for DateTimeOffset using the culture
invariant yyyy-MM-ddTHH:mm:ss.fffzzz format.
Inheritance
DateTimeOffsetJsonConverter
Assembly: Neon.Common.dll
Syntax
public class DateTimeOffsetJsonConverter : JsonConverter<DateTimeOffset>, IEnhancedJsonConverter
Properties
Type
Returns the type handled by the converter.
Declaration
public Type Type { get; }
Property Value
Methods
ReadJson(JsonReader, Type, DateTimeOffset, bool, JsonSerializer)
Declaration
public override DateTimeOffset ReadJson(JsonReader reader, Type objectType, DateTimeOffset existingValue, bool hasExistingValue, JsonSerializer serializer)
Parameters
Type |
Name |
Description |
JsonReader |
reader |
|
Type |
objectType |
|
DateTimeOffset |
existingValue |
|
bool |
hasExistingValue |
|
JsonSerializer |
serializer |
|
Returns
ToSimpleString(object)
Converts an object instance to a simple (non-JSON) string.
Declaration
public string ToSimpleString(object instance)
Parameters
Type |
Name |
Description |
object |
instance |
The object instance.
|
Returns
Type |
Description |
string |
The rendered string.
|
WriteJson(JsonWriter, DateTimeOffset, JsonSerializer)
Declaration
public override void WriteJson(JsonWriter writer, DateTimeOffset value, JsonSerializer serializer)
Parameters
Type |
Name |
Description |
JsonWriter |
writer |
|
DateTimeOffset |
value |
|
JsonSerializer |
serializer |
|
Implements