> +   @POST
> +   @Path("/{serverId}/stop")
> +   void stopServer(@PathParam("dataCenterId") String dataCenterId, 
> @PathParam("serverId") String serverId);
> +   
> +   static final class ServerParser extends ParseJson<Server> {
> +      @Inject ServerParser(Json json) {
> +         super(json, TypeLiteral.get(Server.class));
> +      }
> +
> +      @Override
> +      public <V> V apply(InputStream stream, Type type) throws IOException {
> +         String data = Strings2.toStringAndClose(stream);
> +         
> +         Gson gson = new Gson();
> +         Type mapType = new TypeToken<Map<String, Object>>(){}.getType();
> +         Map<String, String> jsonMap = gson.fromJson(data, mapType);

Does 
```
Map<String, String> jsonMap = json.fromJson( data, mapType );
```
work here? If so, you may remove the use of `Gson` here

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/227/files#r51215101

Reply via email to