Chapter 6. Appendix A1: A short list of REST/JSON libraries

The following list is by no means exhaustive of all available implementations. In most cases REST/JSON implementation are embedded in the language itself and are logically split between a network library that will take care of the HTTP request and a JSON library that will unmarshal the response.

The excellent Jackson library will help you parse and create JSON - see - while the embedded class will take care of the connection.
You can use the JSON module and LWP::UserAgent for accessing the remote QM instance.
The json and urllib2 libraries should be immediately available.
JavaScript / NodeJS
The http module will take care of the connection while JSON.parse will decode the output.
C# / .Net
Can be done natively - see example at

You can usually read a remote URL with php_curl and retry the JSON structure with json_decode . Here’s an example of a GET query with php:

$url = "http://queuemetrics-server:8080/queuemetrics/agent/73/
$ch = curl_init();
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "GET");
curl_setopt($ch, CURLOPT_USERPWD, "username:password");
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$output = curl_exec($ch);
print_r(json_decode($output, true));
The modules json and open-uri are available in the standard library.
Can be done natively leveraging the encoding/json and net/http packages.