Assembly: OptimaJet.Workflow.Core

Class NewtonsoftDefaultValueJsonConverter

OptimaJet.Workflow.Core.Designer.NewtonsoftDefaultValueJsonConverter

Provides a JsonConverter that converts CodeActionParameterDefinition.DefaultValue between its string representation and JSON values.

public class NewtonsoftDefaultValueJsonConverter : JsonConverter

Type Hierarchy

  • JsonConverter
    • NewtonsoftDefaultValueJsonConverter Current type

Methods

public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer) #
Writes the JSON representation of CodeActionParameterDefinition.DefaultValue.

Parameters

Name
Type
Description
writer
JsonWriter
The JsonWriter that receives the JSON value.
value
Object
The string value to serialize.
serializer
JsonSerializer
The JsonSerializer performing the serialization.
public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer) #
Reads a JSON value into the string representation used by CodeActionParameterDefinition.DefaultValue.

Parameters

Name
Type
Description
reader
JsonReader
The JsonReader positioned at the value to read.
objectType
Type
The target Type.
existingValue
Object
The existing value supplied by serializer; this converter does not use it.
serializer
JsonSerializer
The JsonSerializer performing the deserialization; this converter does not use it.

Returns

Type
Description
Object
The string representation of the JSON value, or null when the current token is JsonToken.Null.
public override bool CanConvert(Type objectType) #
Determines whether objectType represents a string.

Parameters

Name
Type
Description
objectType
Type
The Type to evaluate.

Returns

Type
Description
Boolean
true if objectType represents a string; otherwise, false.