Created September 30, 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.
java.net.URL url = new java.net.URL(baseURL + "/api/v2/manager/control/service/{service}/datasource/{datasource}/replicator/relay"); ObjectMapper mapper = new ObjectMapper(); java.net.URLConnection connection = url.openConnection(); connection.setDoOutput(true); connection.connect(); mapper.writeValue(connection.getOutputStream(), object); TaskPayload result = (TaskPayload) mapper.readValue( connection.getInputStream(), TaskPayload.class ); //handle the result as needed...
javax.ws.rs.client.Client client = javax.ws.rs.client.ClientBuilder.newClient(); TaskPayload result = client.target(baseUrl + "/api/v2/manager/control/service/{service}/datasource/{datasource}/replicator/relay") .post(javax.ws.rs.client.Entity.entity(object, "application/json"), TaskPayload.class); //handle the result as needed...
name | size | description |
---|---|---|
api-json-client.jar | 31.39K | The binaries for the Java JSON client library. |
api-json-client-json-sources.jar | 23.64K | The sources for the Java JSON client library. |
Created September 30, 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+.
//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();
name | size | description |
---|---|---|
api-php-json-client-php.zip | 9.88K | 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(); |