Browse Source

GsonProvider

pull/55/head
Kalle Stenflo 10 years ago
parent
commit
0c68aa8615
  1. 5
      json-path/src/main/java/com/jayway/jsonpath/internal/spi/json/GsonProvider.java

5
json-path/src/main/java/com/jayway/jsonpath/internal/spi/json/GsonProvider.java

@ -23,7 +23,6 @@ public class GsonProvider extends AbstractJsonProvider {
private static final JsonParser parser = new JsonParser();
private static final Gson gson = new Gson();
public Object unwrap(Object o){
if(o == null){
return null;
@ -90,7 +89,7 @@ public class GsonProvider extends AbstractJsonProvider {
@Override
public String toJson(Object obj) {
return ((JsonElement)obj).toString();
return obj.toString();
}
@Override
@ -113,6 +112,7 @@ public class GsonProvider extends AbstractJsonProvider {
return toJsonArray(obj).get(idx);
}
@Override
public Object getMapValue(Object obj, String key) {
Object o = toJsonObject(obj).get(key);
@ -140,7 +140,6 @@ public class GsonProvider extends AbstractJsonProvider {
} else {
array.set(index, toJsonElement(value));
}
}
}

Loading…
Cancel
Save