JSONObject valueAsJson = json.optJSONObject("keyString");
Assert.assertNotNull(valueAsJson);
Assert.assertTrue(valueAsJson.has(GraphSONTokens.TYPE));
Assert.assertEquals(GraphSONTokens.TYPE_STRING, valueAsJson.optString(GraphSONTokens.TYPE));
Assert.assertTrue(valueAsJson.has(GraphSONTokens.VALUE));
Assert.assertEquals("string", valueAsJson.optString(GraphSONTokens.VALUE));
valueAsJson = json.optJSONObject("keyLong");
Assert.assertNotNull(valueAsJson);
Assert.assertTrue(valueAsJson.has(GraphSONTokens.TYPE));
Assert.assertEquals(GraphSONTokens.TYPE_LONG, valueAsJson.optString(GraphSONTokens.TYPE));