C# Client Library
A C# Client Library for the AnalyzeRe REST API
Loading...
Searching...
No Matches
AnalyzeRe.JsonConverters.AnalyzeReJsonConverter Class Reference

A pre-configured RestSharp serializer / deserializer which is made to support parsing of AnalyzeRe API JSON strings, including complex objects such as derived resources, references, URIs and DateTimes. More...

Public Member Functions

 AnalyzeReJsonConverter ()
 Create a new AnalyzeRe JsonConverter.
 
object Deserialize (string json, Type deserializeType)
 Deserializes the rest response to a run-time type as per this converter's configuration.
 
Deserialize< T > (IRestResponse response)
 Deserializes the rest response as per this converter's configuration.
 
Deserialize< T > (string json)
 Deserializes the JSON string as per this converter's configuration.
 
string Serialize (object obj)
 Serialize the object as JSON.
 
string Serialize (object obj, bool indented)
 Serialize the object as JSON.
 

Public Attributes

readonly JsonSerializerSettings DeserializerSettings = DefaultDeserializerSettings.ShallowCopy()
 The JsonSerializerSettings settings used for deserializing resources.
 
readonly JsonSerializerSettings SerializerSettings = DefaultSerializerSettings.ShallowCopy()
 The JsonSerializerSettings settings used for serializing resources.
 

Static Public Attributes

static readonly AnalyzeReJsonConverter Default = new AnalyzeReJsonConverter()
 Returns the default AnalyzeReJsonConverter instance.
 

Properties

string ContentType [get, set]
 RestSharp.Deserializers.IDeserializer.ContentType.
 
CultureInfo Culture [get, set]
 RestSharp.Deserializers.IDeserializer.Culture.
 
string DateFormat [get, set]
 RestSharp.Deserializers.IDeserializer.DateFormat.
 
static JsonSerializerSettings DefaultDeserializerSettings [get]
 The Newtonsoft.Json.JsonSerializerSettings settings used for deserializing resources.
 
static JsonSerializerSettings DefaultSerializerSettings [get]
 The Newtonsoft.Json.JsonSerializerSettings settings used for serializing resources.
 
string Namespace [get, set]
 RestSharp.Deserializers.IDeserializer.Namespace.
 
string RootElement [get, set]
 RestSharp.Deserializers.IDeserializer.RootElement.
 

Detailed Description

A pre-configured RestSharp serializer / deserializer which is made to support parsing of AnalyzeRe API JSON strings, including complex objects such as derived resources, references, URIs and DateTimes.

Definition at line 17 of file AnalyzeReJsonConverter.cs.

Inheritance diagram for AnalyzeRe.JsonConverters.AnalyzeReJsonConverter:

Constructor & Destructor Documentation

◆ AnalyzeReJsonConverter()

AnalyzeRe.JsonConverters.AnalyzeReJsonConverter.AnalyzeReJsonConverter ( )
inline

Create a new AnalyzeRe JsonConverter.

Definition at line 105 of file AnalyzeReJsonConverter.cs.

Member Function Documentation

◆ Deserialize()

object AnalyzeRe.JsonConverters.AnalyzeReJsonConverter.Deserialize ( string  json,
Type  deserializeType 
)
inline

Deserializes the rest response to a run-time type as per this converter's configuration.

Parameters
jsonThe string to deserialize.
deserializeTypeThe type to deserialize to.
Returns
A new instance of type T filled in with the deserialized response content.

Definition at line 159 of file AnalyzeReJsonConverter.cs.

◆ Deserialize< T >() [1/2]

T AnalyzeRe.JsonConverters.AnalyzeReJsonConverter.Deserialize< T > ( IRestResponse  response)
inline

Deserializes the rest response as per this converter's configuration.

Template Parameters
TThe type to deserialize to.
Parameters
responseThe response to deserialize.
Returns
A new instance of type T filled in with the deserialized response content.

Definition at line 132 of file AnalyzeReJsonConverter.cs.

◆ Deserialize< T >() [2/2]

Deserializes the JSON string as per this converter's configuration.

Template Parameters
TThe type to deserialize to.
Parameters
jsonThe string to deserialize.
Returns
A new instance of type T filled in with the deserialized JSON string.

Definition at line 145 of file AnalyzeReJsonConverter.cs.

◆ Serialize() [1/2]

string AnalyzeRe.JsonConverters.AnalyzeReJsonConverter.Serialize ( object  obj)
inline

Serialize the object as JSON.

Parameters
objThe object to serialize.
Returns
Serialized JSON of the object.

Definition at line 167 of file AnalyzeReJsonConverter.cs.

◆ Serialize() [2/2]

string AnalyzeRe.JsonConverters.AnalyzeReJsonConverter.Serialize ( object  obj,
bool  indented 
)
inline

Serialize the object as JSON.

Parameters
objThe object to serialize.
indentedChoose whether to use indented formatting or not
Returns
Serialized JSON of the object.

Definition at line 176 of file AnalyzeReJsonConverter.cs.

Member Data Documentation

◆ Default

readonly AnalyzeReJsonConverter AnalyzeRe.JsonConverters.AnalyzeReJsonConverter.Default = new AnalyzeReJsonConverter()
static

Returns the default AnalyzeReJsonConverter instance.

Definition at line 20 of file AnalyzeReJsonConverter.cs.

◆ DeserializerSettings

readonly JsonSerializerSettings AnalyzeRe.JsonConverters.AnalyzeReJsonConverter.DeserializerSettings = DefaultDeserializerSettings.ShallowCopy()

The JsonSerializerSettings settings used for deserializing resources.

By default, this is instantiated to a copy of the DefaultDeserializerSettings

Definition at line 84 of file AnalyzeReJsonConverter.cs.

◆ SerializerSettings

readonly JsonSerializerSettings AnalyzeRe.JsonConverters.AnalyzeReJsonConverter.SerializerSettings = DefaultSerializerSettings.ShallowCopy()

The JsonSerializerSettings settings used for serializing resources.

By default, this is instantiated to a copy of the DefaultSerializerSettings

Definition at line 88 of file AnalyzeReJsonConverter.cs.

Property Documentation

◆ ContentType

string AnalyzeRe.JsonConverters.AnalyzeReJsonConverter.ContentType
getset

RestSharp.Deserializers.IDeserializer.ContentType.

Definition at line 93 of file AnalyzeReJsonConverter.cs.

◆ Culture

CultureInfo AnalyzeRe.JsonConverters.AnalyzeReJsonConverter.Culture
getset

RestSharp.Deserializers.IDeserializer.Culture.

Definition at line 95 of file AnalyzeReJsonConverter.cs.

◆ DateFormat

string AnalyzeRe.JsonConverters.AnalyzeReJsonConverter.DateFormat
getset

RestSharp.Deserializers.IDeserializer.DateFormat.

Definition at line 97 of file AnalyzeReJsonConverter.cs.

◆ DefaultDeserializerSettings

JsonSerializerSettings AnalyzeRe.JsonConverters.AnalyzeReJsonConverter.DefaultDeserializerSettings
staticget

The Newtonsoft.Json.JsonSerializerSettings settings used for deserializing resources.

Definition at line 27 of file AnalyzeReJsonConverter.cs.

◆ DefaultSerializerSettings

JsonSerializerSettings AnalyzeRe.JsonConverters.AnalyzeReJsonConverter.DefaultSerializerSettings
staticget

The Newtonsoft.Json.JsonSerializerSettings settings used for serializing resources.

Definition at line 56 of file AnalyzeReJsonConverter.cs.

◆ Namespace

string AnalyzeRe.JsonConverters.AnalyzeReJsonConverter.Namespace
getset

RestSharp.Deserializers.IDeserializer.Namespace.

Definition at line 99 of file AnalyzeReJsonConverter.cs.

◆ RootElement

string AnalyzeRe.JsonConverters.AnalyzeReJsonConverter.RootElement
getset

RestSharp.Deserializers.IDeserializer.RootElement.

Definition at line 101 of file AnalyzeReJsonConverter.cs.


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