Class NewtonsoftDynamicParameterConverter
OptimaJet.Workflow.Core.Model.NewtonsoftDynamicParameterConverter
Provides a JsonConverter that converts DynamicParameter values to and from JSON by using DynamicParameter.SerializeToJson() and DynamicParameter.ParseJson(JToken), respectively.
Namespace: OptimaJet.Workflow.Core.Model
public class NewtonsoftDynamicParameterConverter : JsonConverterType Hierarchy
- JsonConverter
- NewtonsoftDynamicParameterConverter Current type
Methods
public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer) #Writes the JSON representation returned by DynamicParameter.SerializeToJson().
Parameters
Name
Type
Description
writerJsonWriterThe JsonWriter that receives the JSON value.
serializerJsonSerializerThe JsonSerializer performing the serialization; this converter does not use it.
public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer) #Reads a JSON value and converts it through DynamicParameter.ParseJson(JToken).
Parameters
Name
Type
Description
readerJsonReaderThe JsonReader positioned at the value to read.
existingValueObjectThe existing value; this converter does not use it.
serializerJsonSerializerThe JsonSerializer performing the deserialization; this converter does not use it.
Returns
Type
Description
ObjectA scalar or collection value for the corresponding JSON value; a DynamicParameter for a JSON object; or null for a JSON null value.
public override bool CanConvert(Type objectType) #Determines whether
objectType is exactly DynamicParameter.Parameters
Name
Type
Description
Returns
Type
Description
Boolean