Lean  $LEAN_TAG$
QuantConnect.Util.SingleValueListConverter< T > Class Template Reference

Reads json and always produces a List, even if the input has just an object More...

Inheritance diagram for QuantConnect.Util.SingleValueListConverter< T >:
[legend]

Public Member Functions

override void WriteJson (JsonWriter writer, object value, JsonSerializer serializer)
 Writes the JSON representation of the object. If the instance is not a list then it will be wrapped in a list More...
 
override object ReadJson (JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer)
 Reads the JSON representation of the object. If the JSON represents a singular instance, it will be returned in a list. More...
 
override bool CanConvert (Type objectType)
 Determines whether this instance can convert the specified object type. More...
 

Detailed Description

Reads json and always produces a List, even if the input has just an object

Definition at line 25 of file SingleValueListConverter.cs.

Member Function Documentation

◆ WriteJson()

override void QuantConnect.Util.SingleValueListConverter< T >.WriteJson ( JsonWriter  writer,
object  value,
JsonSerializer  serializer 
)

Writes the JSON representation of the object. If the instance is not a list then it will be wrapped in a list

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

Definition at line 34 of file SingleValueListConverter.cs.

◆ ReadJson()

override object QuantConnect.Util.SingleValueListConverter< T >.ReadJson ( JsonReader  reader,
Type  objectType,
object  existingValue,
JsonSerializer  serializer 
)

Reads the JSON representation of the object. If the JSON represents a singular instance, it will be returned in a list.

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

Definition at line 52 of file SingleValueListConverter.cs.

◆ CanConvert()

override bool QuantConnect.Util.SingleValueListConverter< T >.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; otherwise, false.

Definition at line 71 of file SingleValueListConverter.cs.


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