Package com.thetransactioncompany.jsonrpc2.util

Utility classes for typed retrieval of JSON-RPC 2.0 request parameters on the server side.

The following parameter type conversion choices are available:

  • JSON true/false to Java boolean
  • JSON number to Java int, long, float or double
  • JSON string to java.lang.String
  • Predefined (enumerated) JSON string to a Java enum constant or java.lang.String
  • JSON array to Java boolean[], int[], long[], float[], double[] or string[] array, or to mixed type java.util.List
  • JSON object to java.util.Map

If a parameter cannot be retrieved, either because it's missing or is of the wrong type, a standard JSONRPC2Error.INVALID_PARAMS exception is thrown.

There are two concrete classes:

Package dependencies: The classes in this package depend on the sister com.thetransactioncompany.jsonrpc2 package.

Vladimir Dzhuvinov