@nacx @demobox Sometimes the answer from the API cannot be parsed directly. 
E.g. it may contain an array with only one object instead of the object itself.

Concrete example:

    {
        "objects": [
            {
                "affinities": [
                    "ssd",
                    "sample"
                ],
                "allow_multimount": true,
                "jobs": [],
                "licenses": [],
                "media": "disk",
                "meta": {},
                "mounted_on": [
                ],
                "name": "test_drive_y",
                "owner": {
                    "resource_uri": 
"/api/2.0/user/5b4a69a3-8e78-4c45-a8ba-8b13f0895e23/",
                    "uuid": "5b4a69a3-8e78-4c45-a8ba-8b13f0895e23"
                },
                "resource_uri": 
"/api/2.0/drives/e96f3c63-6f50-47eb-9401-a56c5ccf6b32/",
                "size": 1024000000,
                "status": "unmounted",
                "tags": [],
                "uuid": "e96f3c63-6f50-47eb-9401-a56c5ccf6b32"
            }
        ]
    }

Right now we parse it using [custom 
class](https://github.com/GreatFruitOmsk/jclouds-labs/blob/cloudsigma2-api/cloudsigma2/src/main/java/org/jclouds/cloudsigma2/functions/ParseDriveInfo.java).
 How would we parse it with Gson?

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/12#issuecomment-21916322

Reply via email to