Patent ID: 7730041

Claim:
In a computing system that includes a serialization mechanism, a method for serializing one or more data fields of a data object rather than serializing the entire data object itself, the method comprising the following: an act of accessing a data object to be subjected to serialization; an act of determining the data object is associated with a data contract which is independent and separated from the data object and that specifies one or more data field types that are to be serialized for data objects that are associated with the data contract, the data contract further including designators that designate whether serialization of the data field types is mandatory or, alternatively, optional; for each data field type in the data contract that is associated with the data object, determining whether or not the data object has one or more corresponding data fields, such that only the specific data fields specified in the data contract are accessed and serialized and while refraining from accessing and serializing data fields that are not specifically specified in the data contract and without regard to content of the data fields, and such that selection of data fields to be serialized from the data object is based upon the separate and independent data contract and rather than being based upon actual data contained within the data fields; if it is determined that the data object does have one or more data fields corresponding to one of the data field types of the data contract, extracting the one or more data fields from the data object; determining a format to serialize the extracted one or more data fields in; and serializing only the extracted one or more data fields of the data object into the serialization format and rather than the entire data object; and if it is determined that there are no data fields in the data object corresponding to a particular data field type found in the data contract, determining whether the particular data field type comprises a mandatory or, alternatively, an optional data field type by examining designators that are present within the data contract, and wherein if it is determined the particular data field type comprises a mandatory data field type, searching a supplemental data structure associated with the data object for an associated data field corresponding to the particular data field type the associated data field having been written to the supplemental data structure during a previous deserialization of serialized data to the data object, and extracting the data field to be serialized from the supplemental data structure, and wherein if the search of the supplemental data structure fails the method further includes generating the serialization error.