Example #1
0
 /// <summary>
 /// Reads the JSON or XML document and returns the deserialized object.
 /// </summary>
 /// <param name="serializedObject">The serialized object.</param>
 /// <param name="format">The format of the serialized object.</param>
 /// <returns>The deserialized object.</returns>
 public static TC FromString(string serializedObject, MessageFormat format = MessageFormat.Json)
 {
     return(Serialization.Deserialise <TC>(serializedObject, format));
 }
Example #2
0
 /// <summary>
 /// Returns a serial representation of the object in the specified format.
 /// </summary>
 /// <param name="format">Format to serialize to.</param>
 /// <returns>The serialized object.</returns>
 public string ToString(MessageFormat format)
 {
     return(Serialization.Serialize(this, format));
 }