Compression of javascript object notation data using structure information
AssigneeInternational Business Machines Corporation
InventorsUmesh Kumar Balaraj Balegar, Logeswaran T. Rajamanickam, Ashrith Shetty, Rohit Shetty
Life of this patent
Estimating the term…
Abstract
A method for encoding and decoding a javascript object notation (JSON) document utilizing a statistical tree representing a JSON Schema. The encoded statistical tree may be optimized.
Claims25
A method for encoding a javascript object notation (JSON) document utilizing a statistical tree representing a JSON Schema, comprising the steps of:
- a computer establishing a root node of the statistical tree;
- the computer sequentially selecting each of a plurality of fragments of the JSON document;
- the computer locating a genuine node having properties corresponding to the respective fragment in the statistical tree corresponding to each of the selected fragments;
- the computer determining a binary code representing a path of traversal through the statistical tree to the corresponding genuine node from the root node;
- the computer ordering the binary code in accordance with the sequence of the respective fragments in the JSON document;
- the computer analyzing each located genuine node to determine the type of node, with the determined type being utilized to establish a next genuine node for encoding the sequentially next fragment of the JSON document;
- and
- the computer optimizing the statistical tree to reduce a number of bits comprising the binary code representing elements, enumerations, and attributes of the JSON document.
A method for decoding a JSON document represented by a binary encoded sequence, the method comprising:
- a computer establishing a root node in a statistical tree representing a JSON Schema of the JSON document;
- the computer traversing the statistical tree from the designated root node to locate a next genuine node, the traversal based upon at least one portion of the binary encoded sequence bits;
- the computer generating a fragment of the JSON document, the fragment corresponding to the located genuine node;
- the computer ordering the generated fragments in accordance with the order of the corresponding bits in the binary sequence;
- the computer analyzing each located genuine node to determine the type of node, with the determined type being utilized to establish a next genuine node for decoding the sequentially next fragment of the JSON document;
- and
- the computer optimizing the statistical tree to reduce a number of bits comprising the binary code representing elements, enumerations, and attributes of the JSON document;
- wherein each genuine node is analyzed to determine a type of the node, the type of node determining if a next genuine node is to be designated for traversing the statistical tree in according with the bits corresponding to the sequentially next at least one portion of the binary encoded sequence.
A computer program product for encoding a javascript object notation (JSON) document utilizing a statistical tree representing a JSON Schema with a computer comprising at least one processor, one or more memories, one or more computer readable storage media, the computer program product comprising a computer readable storage medium having program instructions embodied therewith, the program instructions executable by the computer to perform a method comprising:
- establishing, by the computer, a root node of the statistical tree;
- sequentially, by the computer, selecting each of a plurality of fragments of the JSON document;
- locating, by the computer, a genuine node having properties corresponding to the respective fragment in the statistical tree corresponding to each of the selected fragments;
- determining, by the computer, a binary code representing a path of traversal through the statistical tree to the corresponding genuine node from the root node;
- ordering, by the computer, the binary code in accordance with the sequence of the respective fragments in the JSON document;
- analyzing, by the computer, each located genuine node to determine the type of node, with the determined type being utilized to establish a next genuine node for encoding the sequentially next fragment of the JSON document;
- and
- optimizing, by the computer, the statistical tree to reduce a number of bits comprising the binary code representing elements, enumerations, and attributes of the JSON document.
A computer system for encoding a javascript object notation (JSON) document utilizing a statistical tree representing a JSON Schema comprising a computer comprising at least one processor, one or more memories, one or more computer readable storage media having program instructions executable by the computer to perform the program instructions comprising:
- establishing, by the computer, a root node of the statistical tree;
- sequentially, by the computer, selecting each of a plurality of fragments of the JSON document;
- locating, by the computer, a genuine node having properties corresponding to the respective fragment in the statistical tree corresponding to each of the selected fragments;
- determining, by the computer, a binary code representing a path of traversal through the statistical tree to the corresponding genuine node from the root node;
- ordering, by the computer, the binary code in accordance with the sequence of the respective fragments in the JSON document;
- analyzing, by the computer, each located genuine node to determine the type of node, with the determined type being utilized to establish a next genuine node for encoding the sequentially next fragment of the JSON document;
- and
- optimizing, by the computer, the statistical tree to reduce a number of bits comprising the binary code representing elements, enumerations, and attributes of the JSON document.
Dependencies are inferred from the claim text.