Deep cloning of objects using binary format
US-9817857-B2 · Nov 14, 2017 · US
US9760380B2 · US · B2
| Field | Value |
|---|---|
| Publication number | US-9760380-B2 |
| Application number | US-201213419441-A |
| Country | US |
| Kind code | B2 |
| Filing date | Mar 14, 2012 |
| Priority date | Mar 14, 2012 |
| Publication date | Sep 12, 2017 |
| Grant date | Sep 12, 2017 |
A practical reading order for non-experts. Skip the full description unless you need deep technical detail.
What the patent document calls the invention.
A short plain-language summary of the technical disclosure.
Who owns or filed the patent and who is credited as inventor.
Filing, priority, publication, and grant dates set the timeline.
The legal scope of protection — read this for what is actually claimed.
Technology tags used to group this patent with similar filings.
Prior art links and similar publications in this corpus.
Official abstract text for this publication.
Aspects of the subject matter described herein relate to serializing and de-serializing objects. In aspects, a serialization engine uses a grammar to serialize data into a binary representation. The serialization engine may call upon a host serialization engine to serialize embedded object that are not directly supported by the environment hosting the serialization engine. The serialization engine may encode the grammar used to serialize the data into the serialized data for use in de-serializing the data. After the object is serialized, the serialized data may be de-serialized when desired by using the grammar. The grammar is such that it causes embedded objects and relationships to be preserved in the serialized representation of the object.
Opening claim text (preview).
What is claimed is: 1. A method implemented at least in part by a computer, the method comprising: obtaining a grammar that defines a format for serializing an object, the grammar representing rules for serializing the object that preserve embedded objects and relationships in a serialized representation of the object, the grammar defining a header and a payload for serializing the object, the header including metadata for the grammar, the metadata usable in de-serializing objects serialized using the grammar, the grammar having rules for de-serializing the object based on a difference between a minor version of a serialization engine to serialize the object and a minor version of a de-serialization engine to de-serialize the object and a difference between a major version of the serialization engine to serialize the object and a major version of the de-serialization engine to de-serialize the object, the payload including an identifier of each descendent object of the object, the payload further including reference data for each reference, if any, included in the object, the reference data indicating relationships of the object, the reference data potentially referring to one or more of: an object type supported by a scripting environment in which the object resides, an object type supported by a host environment of the scripting environment, and a foreign object type that is defined outside of both the scripting environment and the host environment; and serializing the object into serialized data by executing code that implements the grammar. 2. The method of claim 1 , wherein obtaining a grammar comprises obtaining a grammar that specifies an ordering of bits within the serialized data such that the ordering of the bits within the serialized data to represent the object is independent of a processing architecture of the computer. 3. The method of claim 1 , wherein obtaining the grammar comprises retrieving the code from a store. 4. The method of claim 1 , wherein obtaining the grammar comprises retrieving a set of rules from a store. 5. The method of claim 1 , further comprising encoding the grammar into the serialized data such that an entity receiving the serialized data is allowed to read the grammar from the serialized data and use the grammar to de-serialize the serialized data. 6. The method of claim 1 , wherein the grammar further defines a date format that includes at least eight bytes that represent a date in milliseconds from a configurable time. 7. The method of claim 1 , wherein serializing the object comprises aligning each value of the object on a byte boundary of selectable length. 8. The method of claim 1 , wherein serializing the object comprises representing each character of the object, if any, with two or more bytes. 9. The method of claim 1 , further comprising: obtaining the grammar from the serialized data; de-serializing the serialized data by executing code that implements the grammar. 10. In a computing environment, a system, comprising: a store operable to provide access to a grammar, the grammar defining a format for serializing an object, the grammar representing rules for serializing the object that preserve embedded objects and relationships in a serialized representation of the object, the grammar defining a header and a payload for serializing the object, the header including metadata of the grammar the metadata usable in de-serializing objects serialized using the grammar, the grammar having rules for de-serializing the objects based on a difference between a minor version of a first serialization engine to serialize the object and a minor version of a first de-serialization engine to de-serialize the object and a difference between a major version of the first serialization engine to serialize the object and a major version of the first de-serialization engine to de-serialize the object, the payload including an identifier of each descendent object of the object, the payload further including reference data for each reference, if any, included in the object, the reference data indicating relationships of the object, the reference data potentially referring to one or more of: an object type supported by a scripting environment in which the object resides, an object type supported by a host environment of the scripting environment, and a foreign object type that is defined outside of both the scripting environment and the host environment; and the first serialization engine operable to use the grammar to serialize the object into serialized data. 11. The system of claim 10 , wherein the first serialization engine is hosted in a scripting environment operable to execute scripts. 12. The system of claim 10 , further comprising a second serialization engine operable to use the grammar to serialize host objects that are referenced by the object. 13. The system of claim 12 , wherein the second serialization engine is further operable to serialize foreign objects that are defined outside of the scripting environment and the host environment. 14. The system of claim 12 , wherein the first serialization engine being operable to use the grammar to serialize the object into serialized data comprises the first serialization engine being operable to generate serialized data having an order defined by the grammar, the order independent of a processing architecture upon which the first serialization engine executes. 15. The system of claim 10 , further comprising a deserialization engine operable to use another grammar to attempt de-serialize the serialized data to create the object in a destination environment. 16. The system of claim 15 , wherein the deserialization engine is further operable to obtain a version of the grammar from the metadata, the version used to create the serialized data, the deserialization engine further operable to compare the version to a version of the another grammar. 17. The system of claim 16 , wherein the deserialization engine is further operable to refrain from de-serializing the serialized data if the version of the grammar used to create the serialized data is more than a minor version different than the version of the another grammar. 18. A computer storage medium having computer-executable instructions, which when executed perform actions, comprising: obtaining a grammar that defines a format for serializing an object, the grammar representing rules for serializing the object that preserve embedded objects and relationships in a serialized representation of the object, the grammar defining a header and a payload for serializing the object, the header including metadata of the grammar, the payload including an identifier of each descendent object of the object, the payload further including reference data for each reference, if any, included in the object, the reference data indicating relationships of the object, the reference data potentially referring to one or more of: an object type supported by a scripting environment in which the object resides, an object type supported by a host environment of the scripting environment, and a foreign object type that is defined outside of both the scripting environment and the host environment; and obtaining serialized data that has been generated using a version of the grammar; de-serialize the serialized data to create a de-serialized representation of the object based on a difference between a minor version of a serialization engine to serialize the object and a minor version of a de-serialization engine to de-serialize the object and a difference between a major v
Object persistence · CPC title
Version control (for software G06F8/71) · CPC title
Command shells · CPC title
Physics · mapped topic
Physics · mapped topic
Related publications grouped by family.
Answers are generated from the same data shown on this page.