Class StringSerializer

A very simple flat object serializer that can be used for intra application serialization. It creates a very compact positional string of properties. Only serializes top level properties, with no nesting support and only simple properties or those with a type converter are supported. Complex properties or non-two way type convertered values are ignored.

Creates strings in the format of: Rick||1|True|3/29/2013 1:32:31 PM|1

public static class StringSerializer : object


This component is meant for intra application serialization of very compact objects. A common use case is for state serialization for cookies or a Forms Authentication ticket to minimize the amount of space used - the output produced here contains only the actual data, no property info or validation like other serialization formats. Use only on small objects when size and speed matter otherwise use a JSON/XML/Binary serializer or the ASP.NET LosFormatter object.

Class Members



Deserializes an object serialized with SerializeObject.

public static T Deserialize(string serialized,     string separator)


Deserializes an object previously serialized by SerializeObject.

public static object DeserializeObject(string serialized,     Type type,     string separator)


Serializes a flat object's properties into a String separated by a separator character/string. Only top level properties are serialized.

public static string SerializeObject(object objectToSerialize,     string separator)


Namespace: Westwind.Utilities
Assembly: westwind.utilities.dll

© West Wind Technologies, 1996-2016 • Updated: 12/12/15
Comment or report problem with topic