Class NotificationConverter2
- Namespace
- Geotab.Checkmate.Serialization
- Assembly
- Geotab.Checkmate.ObjectModel.dll
Json converter for Notification
public class NotificationConverter2 : GeotabJsonConverter2<Notification>
- Inheritance
-
NotificationConverter2
- Inherited Members
Constructors
NotificationConverter2()
public NotificationConverter2()
Properties
ShouldSerializeProp
Gets a Func that controls which properties are serialized, and handles any non-standard property serialization.
protected virtual Func<PropertyInfo, Notification, object?> ShouldSerializeProp { get; }
Property Value
- Func<PropertyInfo, Notification, object>
A Func that takes a PropertyInfo and the object containing that property. This Func should return one of three things: the Serialize object which tells the caller to serialize this property, the DontSerialize object which tells the caller to skip this property, or a value to be serialized.
Methods
WriteJson(Utf8JsonWriter, Notification?, JsonSerializerOptions)
Same as WriteJson{JsonWriter, object, JsonSerializerOptions} but after the null check has been performed. If value
is null it is OK to write.
public override void WriteJson(Utf8JsonWriter writer, Notification? value, JsonSerializerOptions options)
Parameters
writer
Utf8JsonWriterThe writer.
value
NotificationThe value.
options
JsonSerializerOptionsThe serializer options.