Architecture and method for serialization and deserialization of objects
First Claim
1. A serialization and deserialization architecture, comprising:
- a serialization and deserialization portion adapted to provide serialization information on a data structure;
a pluggable formatter adapted to receive the serialization information and provide a serialized stream in an externalized format defined by the pluggable formatter; and
a utility and contract portion adapted to maintain invariants with serializing and deserializing of the data structure.
2 Assignments
0 Petitions
Accused Products
Abstract
An architecture and method is provided that facilitates serialization of a graph of objects into streams of data in an arbitrary format, and deserialization of the streams of data back into the graph of objects. The architecture provides a number of services associated with the basic functionality of serialization and deserialization. The services can be employed to implement transparent remoting, copy items to a clipboard and save data to a file. The present invention provides facilities which support the plugging in of a new serialization encoding by separating the encoding from the reading and reinstantiation of the graph of objects which the encoding describes. Objects in a graph of objects are serialized and deserialized based on a selected rule set for that object. A rule set can be provided by a class author within a class or within a third party file referred to as a surrogate.
121 Citations
56 Claims
-
1. A serialization and deserialization architecture, comprising:
-
a serialization and deserialization portion adapted to provide serialization information on a data structure;
a pluggable formatter adapted to receive the serialization information and provide a serialized stream in an externalized format defined by the pluggable formatter; and
a utility and contract portion adapted to maintain invariants with serializing and deserializing of the data structure. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14)
-
-
15. An architecture for facilitate deserialization of a serial stream into a graph of objects, comprising:
-
a plurality of rule sets defining serialization information about object types;
a serialization selector adapted to determine a rule set of the plurality of rule sets on how an object was serialized, so that objects can be deserialized by a formatter;
a serialization binder component adapted to specify an object type for deserialization of the objects; and
an object manager adapted to manage deserialization of the objects by the formatter. - View Dependent Claims (16, 17, 18, 19, 20)
-
-
21. A computer readable medium having computer executable components comprising:
-
a formatter programmed to serialize objects based on a rule set for an object type, the rule set being provided in either an object or a third party object;
an object manager programmed to manage the deserialization of objects by the formatter. - View Dependent Claims (22, 23, 24, 25, 26, 27, 28, 29, 30)
-
-
31. An architecture for facilitating serialization of a graph of objects into a serial stream, comprising:
-
a formatter having a serialization decision loop and a pluggable formatter portion, the serialization decision loop retrieving an object from a graph of objects and determining serialization information to be provided to the pluggable formatter portion, the pluggable formatter portion providing a serialized stream populated with the serialization information in an externalized format defined by the pluggable formatter portion;
a surrogate selector defining whether an object type has a surrogate that defines the serialization information to be provided to a formatter; and
a serializable interface implementable into a class type that allows a user to define the serialization information to be provided to the formatter within the class type. - View Dependent Claims (32, 33, 34, 35, 36, 37, 38, 39)
-
-
40. A system for serializing a graph of objects into a serial stream, comprising:
-
a plurality of rule sets defining serialization information about object types;
a serialization selector determining a rule set of the plurality of rule sets to utilize in providing the serialization information to a formatter, the plurality of rule sets comprising a first rule set that allows a user to define the serialization information to be provided in an object and a second rule set that allows a user to define the serialization information of the object in a third party object. - View Dependent Claims (41, 42, 43, 44, 45)
-
-
46. A system for deserializing a serial stream into a graph of objects, comprising:
-
plurality of rule sets defining serialization information about an object types;
a serialization selector adapted to determine a rule set of the plurality of rule sets on how an object was serialized, so the objects can be deserialized by a formatter;
an object type service adapted to create an unitialized instance of an object type for deserialization of the object;
an object tracking service adapted to track the objects during a deserialization process and register fixups due to forward references; and
a fixup service adapted to fill in the objects with data associated with the forward references. - View Dependent Claims (47, 48, 49)
-
-
50. A method for deserialization of a stream into a graph of objects, the method comprising:
-
receiving a decoded serialized stream from a pluggable formatter;
retrieving an object from the decoded serialized stream;
determining an object type for deserialization of the object;
instantiating an uninitialized instance of the object type;
selecting serialization information for the object from one of a surrogate, a serializable interface employed in the object and a default serialization routine, the selected serialization information being employed in a deserialization process;
populating the uninitialized instance of the object type based on the selected serialization information;
registering fixups for the object during the deserialization process due to forward references within the object; and
performing fixups on objects in the object graph caused by the forward references. - View Dependent Claims (51, 52)
-
-
53. A method for serialization of a graph of objects into a stream, the method comprising:
-
retrieving an object from the graph of objects;
assigning the object a unique identification number;
determining if a surrogate selector is associated with the object for objects of that type and employing the surrogate selector to access a surrogate defining serialization information about the object;
determining if the object employs a serializable interface if the object does not have a surrogate, and accessing the serialization information within the object if the object employs the serializable interface and employing the serialization information to determine what portion of the object will be serialized;
determining if the object has serialization markings if the object does not employ the serializable interface or the surrogate and providing a default serialization routine for providing the serialization information;
pushing the object to a data structure and populating the data structure based on the serialization information; and
serializing the data structure to an externalized format defined by a pluggable formatter. - View Dependent Claims (54)
-
-
55. A system for serializing and deserializing a graph of objects, comprising:
-
means for providing serialization information of an object to a formatter, so that the formatter can serialize the object in a selectable externalized format, the means for providing serialization information being in either the object or a third party object;
means for tracking deserialization of the object outside the formatter; and
means for instantiating an uninitialized instance of a given object type, so that object information can populate the object type. - View Dependent Claims (56)
-
Specification