×

Rule-based automatic class generation from a JSON message

  • US 9,588,742 B2
  • Filed: 02/12/2014
  • Issued: 03/07/2017
  • Est. Priority Date: 09/20/2013
  • Status: Active Grant
First Claim
Patent Images

1. A computer implemented method using a processor executing a process to perform one or more steps, the steps comprising:

  • receiving a set of one or more rules that include an identification portion and an action portion to be applied to one or more JSON messages;

    receiving the one or more JSON messages;

    identifying a class structural or hierarchical characteristic provided by at least one JSON message in the one or more JSON messages;

    identifying a final class structural or hierarchical characteristic for a Java class to be generated for the at least one JSON message;

    generating a structural determination result at least by determining whether there is a structural or hierarchical change between the class structural characteristic provided by the at least one JSON message in the one or more JSON messages and the final class structural characteristic of the Java class to be generated for the at least one JSON message;

    generating one or more Java classes respective to the one or more JSON messages using at least some of the set of one or more rules based in part or in whole on the structural determination results, the one or more JSON messages converted into the one or more Java classes by applying one or more actions specified by the action portion when a corresponding identification portion is identified within at least one of the received one or more JSON messages to convert the one or more JSON messages into the one or more Java classes;

    identifying a form-oriented environment in which one or more message-based services are executed;

    identifying a message-based service that returns a JSON message representation of an executed form and data associated with the executed form in the form-oriented environment;

    accessing the data associated with the executed form for the JSON message representation;

    generating parsing results at least by parsing the data associated with the executed form for the JSON message representation;

    converting at least a portion of the JSON message representation into a first Java object at least by deserializing the at least the portion of the JSON message representation;

    retrieving Java consumable data from the first Java object at least by referencing the first Java object using at least a native Java object;

    identifying a first proprietary data type in a Java environment;

    communicating first data values in the first proprietary data type in a first JSON message, rather than communicating in the first proprietary data type within the Java environment;

    identifying a first preferred format for a first Java class;

    generating the first Java class in the first preferred format at least by applying one or more rules in the set of one or more rules to at least a part of the first JSON message to convert the at least the part of the first JSON message to the first Java class;

    identifying a second proprietary data type in the Java environment;

    generating a different proprietary data type at least by transforming the second proprietary data type into the different proprietary data type;

    communicating second data values in the different proprietary data type in a second JSON message, rather than communicating in the different proprietary data type within the Java environment;

    identifying a second preferred format for a second Java class;

    generating the second Java class in the second preferred format at least by applying at least one rule in the set of one or more rules to at least a part of the second JSON message to convert the at least the part of the second JSON message to the second Java class;

    identifying a hostname, a port, an URL, and login credentials for a server;

    receiving, by a plug-in, a third JSON message by listening to the port for the server;

    identifying a third preferred format for a third Java class;

    generating the third Java class in the third preferred format at least by applying at least some of the set of one or more rules to at least a part of the third JSON message to convert the at least the part of the third JSON message to the third Java class on-the-fly;

    identifying a skeleton of one or more JSON messages;

    creating one or more needed Java classes based on the skeleton of the one or more JSON messages;

    identifying a first rule in the set of one or more rules, the first rule defining one or more Java language constructs that are allowed to be present in at least one Java class of the one or more Java classes with the rule;

    identifying a second rule in the set of one or more rules, the second rule one or more functions and one or more stylistic aspects including one or more formatting characteristics of the one or more Java language constructs;

    defining a fourth Java class with a public access modifier, the fourth Java class comprising a plurality of Java language constructs, a plurality of fields, and a plurality of methods;

    defining the plurality of fields of the fourth Java class with private access modifiers;

    defining the plurality of methods of the fourth Java class with public access modifiers, return types, method names, and parameters;

    selecting a source from which the set of one or more rules is identified;

    selecting a hierarchical structure for at least one Java class of the one or more Java classes;

    verifying integrity of the set of one or more rules at least by detecting inconsistencies; and

    defining a hierarchy on a storage device by using a generated Java class of the one or more Java classes.

View all claims
  • 1 Assignment
Timeline View
Assignment View
    ×
    ×