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|rstrahl@west-wind.com|1|True|3/29/2013 1:32:31 PM|1

System.Object
  Westwind.Utilities.StringSerializer
public static class StringSerializer : object

Remarks

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

MemberDescription

Deserialize

Deserializes an object serialized with SerializeObject.

public static T Deserialize(string serialized,     string separator)

DeserializeObject

Deserializes an object previously serialized by SerializeObject.

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

SerializeObject

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)

Requirements

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

© West Wind Technologies, 1996-2020 • Updated: 07/15/20
Comment or report problem with topic