Handles serialization (and deserialization) of an object. This effectively is a wrapper around JsonConvert methods. But also allows for XML serialization
More...
Handles serialization (and deserialization) of an object. This effectively is a wrapper around JsonConvert methods. But also allows for XML serialization
There is currently no exception handling for these methods. Consider wrapping these calls in SafeTry.IgnoreException method
◆ DeserializeJson< T >()
static T Sphyrnidae.Common.Serialize.Serialization.DeserializeJson< T > |
( |
this string |
json, |
|
|
JsonSerializerSettings |
jsonSettings = null |
|
) |
| |
|
static |
Deserializes an object from JSON
- Template Parameters
-
- Parameters
-
json | The json to convert |
jsonSettings | Optional: The json settings to use |
- Returns
- The converted object
◆ DeserializeXml< T >()
static T Sphyrnidae.Common.Serialize.Serialization.DeserializeXml< T > |
( |
this string |
xml, |
|
|
XmlSerializer |
serializer = null |
|
) |
| |
|
static |
Deserializes an object from XML
- Template Parameters
-
- Parameters
-
xml | The xml to convert |
serializer | Optional: The XML Serializer to use |
- Returns
- The converted object
◆ DeserializeXmlAs< T >()
static object Sphyrnidae.Common.Serialize.Serialization.DeserializeXmlAs< T > |
( |
this string |
xml, |
|
|
XmlSerializer |
serializer = null |
|
) |
| |
|
static |
Deserializes the string and does a convert to the type
- Template Parameters
-
T | The type of object being deserialized/converted |
- Parameters
-
xml | The xml to deserialize |
serializer | Optional: The XML Serializer to use |
- Returns
- An object that is 'converted' to the type
◆ SerializeJson< T >()
static string Sphyrnidae.Common.Serialize.Serialization.SerializeJson< T > |
( |
this T |
item, |
|
|
JsonSerializerSettings |
jsonSettings = null |
|
) |
| |
|
static |
Serializes an object to JSON
- Parameters
-
item | The item being serialized |
jsonSettings | The json settings to use |
- Returns
- The Json representation of the object
◆ SerializeXml< T >()
static string Sphyrnidae.Common.Serialize.Serialization.SerializeXml< T > |
( |
this T |
item, |
|
|
XmlSerializer |
serializer = null |
|
) |
| |
|
static |
Serializes an object to XML
- Parameters
-
item | The item being serialized |
serializer | The XML Serializer to use |
- Returns
- The XML representation of the object
The documentation for this class was generated from the following file:
- C:/Users/dougb/Desktop/Sphyrnidae/New/Common/Common/Serialize/Serialization.cs