2using System.Globalization;
5using Newtonsoft.Json.Converters;
22 #region Serializer Settings
23 private static JsonSerializerSettings _defaultDeserializerSettings;
28 _defaultDeserializerSettings ?? (_defaultDeserializerSettings =
29 new JsonSerializerSettings
31 Culture = CultureInfo.InvariantCulture,
32 DateFormatHandling = DateFormatHandling.IsoDateFormat,
33 DateParseHandling = DateParseHandling.None,
34 DateTimeZoneHandling = DateTimeZoneHandling.Utc,
35 FloatFormatHandling = FloatFormatHandling.Symbol,
36 NullValueHandling = NullValueHandling.Ignore,
37 Converters =
new JsonConverter[]
40 new StringEnumConverter(),
52 private static JsonSerializerSettings _defaultSerializerSettings;
57 _defaultSerializerSettings ?? (_defaultSerializerSettings =
58 new JsonSerializerSettings
60 Culture = CultureInfo.InvariantCulture,
61 DateFormatHandling = DateFormatHandling.IsoDateFormat,
62 DateTimeZoneHandling = DateTimeZoneHandling.Utc,
63 ReferenceLoopHandling = ReferenceLoopHandling.Ignore,
64 FloatFormatHandling = FloatFormatHandling.Symbol,
65 NullValueHandling = NullValueHandling.Ignore,
66 Converters =
new JsonConverter[]
69 new IsoDateTimeConverter {
71 DateTimeStyles = DateTimeStyles.AdjustToUniversal
74 new StringEnumConverter(),
89 #endregion Serializer Settings
91 #region Interface Properties
102 #endregion Interface Properties
107 Culture = CultureInfo.InvariantCulture;
121 return Deserialize<T>(response.Content);
132 public T Deserialize<T>(IRestResponse response)
134 return Deserialize<T>(response.Content);
145 public T Deserialize<T>(
string json)
178 return JsonConvert.SerializeObject(obj,
RestSharp.Deserializers.IDeserializer IDeserializer
RestSharp.Serializers.ISerializer ISerializer
API methods / requests made available to the user.
static readonly string DateTimeFormat
The format used when transmitting DateTime information to Analyze Re servers.
A pre-configured RestSharp serializer / deserializer which is made to support parsing of AnalyzeRe AP...
string Serialize(object obj, bool indented)
Serialize the object as JSON.
static readonly AnalyzeReJsonConverter Default
Returns the default AnalyzeReJsonConverter instance.
string RootElement
RestSharp.Deserializers.IDeserializer.RootElement.
string Serialize(object obj)
Serialize the object as JSON.
string ContentType
RestSharp.Deserializers.IDeserializer.ContentType.
AnalyzeReJsonConverter()
Create a new AnalyzeRe JsonConverter.
static JsonSerializerSettings DefaultDeserializerSettings
The Newtonsoft.Json.JsonSerializerSettings settings used for deserializing resources.
string Namespace
RestSharp.Deserializers.IDeserializer.Namespace.
readonly JsonSerializerSettings DeserializerSettings
The JsonSerializerSettings settings used for deserializing resources.
CultureInfo Culture
RestSharp.Deserializers.IDeserializer.Culture.
static JsonSerializerSettings DefaultSerializerSettings
The Newtonsoft.Json.JsonSerializerSettings settings used for serializing resources.
readonly JsonSerializerSettings SerializerSettings
The JsonSerializerSettings settings used for serializing resources.
object Deserialize(string json, Type deserializeType)
Deserializes the rest response to a run-time type as per this converter's configuration.
string DateFormat
RestSharp.Deserializers.IDeserializer.DateFormat.
A custom property contract resolver which allows Server-Generated Analyze Re properties (ServerGenera...
Ensure that when converting arbitrary dictionaries, nested dictionaries are correctly converted as we...
Allows serializing and deserializing derived Analyze Re Resources to a target base type....
Allows serializing and deserializing derived AnalyzeRe Resource Views to a target base type....
Converts JSON string representations of Perspective to an instance.
Allows serializing and deserializing PortfolioViews, which require a special rule since they can only...
Deserializes AnalyzeRe API Reference objects to a new instance of a the target generic Reference type...
Properties tagged with the framework IgnoreDataMemberAttribute should be ignored by the serializers....
Converts JSON string representations of URLs to and from System.Uri instances.