Files and Libraries

Java JSON Client Library

Created March 29, 2024

The Java client-side library is used to provide the set of Java objects that can be serialized to/from JSON using Jackson. This is useful for accessing the JSON REST endpoints that are published by this application.

Resources Example (Raw JAXB)
java.net.URL url = new java.net.URL(baseURL + "/api/v2/connector/addDataSource");
ObjectMapper mapper = new ObjectMapper();
java.net.URLConnection connection = url.openConnection();
connection.setDoOutput(true);
connection.connect();

mapper.writeValue(connection.getOutputStream(), dataSourcePayload);
StringPayload result = (StringPayload) mapper.readValue( connection.getInputStream(), StringPayload.class );
//handle the result as needed...
    
Resources Example (Jersey client)
javax.ws.rs.client.Client client = javax.ws.rs.client.ClientBuilder.newClient();

StringPayload result = client.target(baseUrl + "/api/v2/connector/addDataSource")
  .post(javax.ws.rs.client.Entity.entity(dataSourcePayload, "application/json"), StringPayload.class);

//handle the result as needed...
    

Files
name size description
connector-json-client.jar 15.74K The binaries for the Java JSON client library.
connector-json-client-json-sources.jar 12.46K The sources for the Java JSON client library.

PHP JSON Client Library

Created March 29, 2024

The PHP JSON client-side library defines the PHP classes that can be (de)serialized to/from JSON. This is useful for accessing the resources that are published by this application, but only those that produce a JSON representation of their resources (content type "application/json").

This library requires the json_encode function which was included in PHP versions 5.2.0+.

PHP JSON Example
//read the resource in JSON:
$json = ...;

//read the json as an array.
$parsed = json_decode($json, true);

//read the json array as the object
$result = new Object($parsed);

//open a writer for the json
$json = $result->toJson();
    

Files
name size description
connector-php-json-client-php.zip 5.04K

The PHP JSON client-side library defines the PHP classes that can be (de)serialized to/from JSON. This is useful for accessing the resources that are published by this application, but only those that produce a JSON representation of their resources (content type "application/json").

This library requires the json_encode function which was included in PHP versions 5.2.0+.

PHP JSON Example
//read the resource in JSON:
$json = ...;

//read the json as an array.
$parsed = json_decode($json, true);

//read the json array as the object
$result = new Object($parsed);

//open a writer for the json
$json = $result->toJson();