摘要:
A method for data discovery and retrieval is provided. A REST API client library provides a discovery document for a data graph. The discovery document is structured data containing: (1) a list of data graph endpoints and (2) the format of the information each endpoint returns. The client library uses the REST API to query the server for a data object, wrapping the data object in a new data object. The new data object contains: (1) fixed data from the server-returned data object and (2) a function for each graph node that is directly connected to the requested data object. When these functions execute, the next data objects in the data graph can be retrieved, allowing for quick graph navigation. Given a discovery document and the ability to generate closures based on the document, a query object can be constructed that traverses several layers of the API at once.
摘要:
A process for serializing and deserializing instance data from a schema is disclosed. A schema can be used to automatically and dynamically generate classes and methods. First, the raw schema may be parsed into an intermediate data structure consisting of pairs representing object properties and attributes of the properties. Then, an exemplary process generates new parser classes and methods by iterating over the intermediate data structure's keys and generating classes or class variables based on the property type. Accessors and mutators are generated for each class variable. Additionally, a serialization method and a constructor method are generated for each class. These classes and methods are stored in memory and can be used by a host programming language to transmit, receive, and manipulate data to or from an API.