51Degrees Pipeline .NET  4.1

51Degrees Pipeline for .NET

FiftyOne.Pipeline.JsonBuilder.Converters.JavaScriptConverter Class Reference

Detailed Description

A JsonConverter that converts JavaScript instances into JSON data.

Inheritance diagram for FiftyOne.Pipeline.JsonBuilder.Converters.JavaScriptConverter:

[legend]

Collaboration diagram for FiftyOne.Pipeline.JsonBuilder.Converters.JavaScriptConverter:

[legend]

Public Member Functions

override bool  CanConvert (Type objectType)
Returns true if the converter can convert objects of the supplied type. More...
override object  ReadJson (JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer)
Convert the data from the given reader. More...
override void  WriteJson (JsonWriter writer, object value, JsonSerializer serializer)
Write the given value to JSON More...

Public Attributes

override bool  CanRead => false
If true then this converter can be used for reading as well as writing JSON. More...

Member Function Documentation

◆ CanConvert()

override bool FiftyOne.Pipeline.JsonBuilder.Converters.JavaScriptConverter.CanConvert ( Type   objectType )

Returns true if the converter can convert objects of the supplied type.

Parameters
objectType - The type to check against.
Returns
True if the converter can convert the supplied type. False if not.

◆ ReadJson()

override object FiftyOne.Pipeline.JsonBuilder.Converters.JavaScriptConverter.ReadJson ( JsonReader   reader,
Type   objectType,
object   existingValue,
JsonSerializer   serializer  
)

Convert the data from the given reader.

Parameters
reader - The reader to read from.
objectType - The type of the object to return.
existingValue - ??
serializer - The serializer to use when reading the JSON.
Returns
The data object.

◆ WriteJson()

override void FiftyOne.Pipeline.JsonBuilder.Converters.JavaScriptConverter.WriteJson ( JsonWriter   writer,
object   value,
JsonSerializer   serializer  
)

Write the given value to JSON

Parameters
writer - The writer to use when writing the output.
value - The value to be converted to JSON
serializer - Not used.
Exceptions
ArgumentNullException - Thrown if one of the supplied parameters is null.

Member Data Documentation

◆ CanRead

override bool FiftyOne.Pipeline.JsonBuilder.Converters.JavaScriptConverter.CanRead => false

If true then this converter can be used for reading as well as writing JSON.