Lean  $LEAN_TAG$
QuantConnect.Util.JsonRoundingConverter Class Reference

Helper JsonConverter that will round decimal and double types, to FractionalDigits fractional digits More...

Inheritance diagram for QuantConnect.Util.JsonRoundingConverter:
[legend]

Public Member Functions

override bool CanConvert (Type objectType)
 Determines whether this instance can convert the specified object type. More...
 
override object ReadJson (JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer)
 Not implemented, will throw NotImplementedException More...
 
override void WriteJson (JsonWriter writer, object value, JsonSerializer serializer)
 Writes the JSON representation of the object. More...
 

Public Attributes

override bool CanRead => false
 Will always return false. Gets a value indicating whether this T:Newtonsoft.Json.JsonConverter can read JSON. More...
 

Static Public Attributes

const int FractionalDigits = 4
 The number of fractional digits to round to More...
 

Detailed Description

Helper JsonConverter that will round decimal and double types, to FractionalDigits fractional digits

Definition at line 26 of file JsonRoundingConverter.cs.

Member Function Documentation

◆ CanConvert()

override bool QuantConnect.Util.JsonRoundingConverter.CanConvert ( Type  objectType)

Determines whether this instance can convert the specified object type.

Parameters
objectTypeType of the object.
Returns
True if this instance can convert the specified object type

Definition at line 44 of file JsonRoundingConverter.cs.

◆ ReadJson()

override object QuantConnect.Util.JsonRoundingConverter.ReadJson ( JsonReader  reader,
Type  objectType,
object  existingValue,
JsonSerializer  serializer 
)

Not implemented, will throw NotImplementedException

Parameters
readerThe T:Newtonsoft.Json.JsonReader to read from.
objectTypeType of the object.
existingValueThe existing value of object being read.
serializerThe calling serializer.

Definition at line 57 of file JsonRoundingConverter.cs.

◆ WriteJson()

override void QuantConnect.Util.JsonRoundingConverter.WriteJson ( JsonWriter  writer,
object  value,
JsonSerializer  serializer 
)

Writes the JSON representation of the object.

Parameters
writerThe T:Newtonsoft.Json.JsonWriter to write to.
valueThe value.
serializerThe calling serializer.

Definition at line 68 of file JsonRoundingConverter.cs.

Member Data Documentation

◆ FractionalDigits

const int QuantConnect.Util.JsonRoundingConverter.FractionalDigits = 4
static

The number of fractional digits to round to

Definition at line 31 of file JsonRoundingConverter.cs.

◆ CanRead

override bool QuantConnect.Util.JsonRoundingConverter.CanRead => false

Will always return false. Gets a value indicating whether this T:Newtonsoft.Json.JsonConverter can read JSON.

Definition at line 37 of file JsonRoundingConverter.cs.


The documentation for this class was generated from the following file: