Browse Source

update json-smart to 2.1.0

pull/57/head
Jochen Berger 10 years ago
parent
commit
16f839bc14
  1. 2
      build.gradle
  2. 15
      json-path/src/main/java/com/jayway/jsonpath/internal/spi/json/JsonSmartJsonProvider.java

2
build.gradle

@ -11,7 +11,7 @@ buildscript {
ext {
libs = [
slf4jApi: 'org.slf4j:slf4j-api:1.7.7',
jsonSmart: 'net.minidev:json-smart:2.0',
jsonSmart: 'net.minidev:json-smart:2.1.0',
jacksonDatabind: 'com.fasterxml.jackson.core:jackson-databind:2.3.4',
gson: 'com.google.code.gson:gson:2.3',
hamcrestCore: 'org.hamcrest:hamcrest-core:1.3',

15
json-path/src/main/java/com/jayway/jsonpath/internal/spi/json/JsonSmartJsonProvider.java

@ -17,13 +17,14 @@ package com.jayway.jsonpath.internal.spi.json;
import com.jayway.jsonpath.InvalidJsonException;
import com.jayway.jsonpath.JsonPathException;
import com.jayway.jsonpath.spi.json.Mode;
import net.minidev.json.JSONArray;
import net.minidev.json.JSONObject;
import net.minidev.json.JSONStyle;
import net.minidev.json.mapper.AMapper;
import net.minidev.json.mapper.DefaultMapperOrdered;
import net.minidev.json.JSONValue;
import net.minidev.json.parser.JSONParser;
import net.minidev.json.parser.ParseException;
import net.minidev.json.writer.JsonReaderI;
import java.io.InputStream;
import java.io.InputStreamReader;
@ -34,25 +35,25 @@ import java.util.Map;
public class JsonSmartJsonProvider extends AbstractJsonProvider {
private final int parseMode;
private final AMapper<?> mapper;
private final JsonReaderI<?> mapper;
public JsonSmartJsonProvider() {
this(JSONParser.MODE_PERMISSIVE, DefaultMapperOrdered.DEFAULT);
this(JSONParser.MODE_PERMISSIVE, JSONValue.defaultReader.DEFAULT_ORDERED);
}
public JsonSmartJsonProvider(int parseMode){
this(parseMode, DefaultMapperOrdered.DEFAULT);
this(parseMode, JSONValue.defaultReader.DEFAULT_ORDERED);
}
public JsonSmartJsonProvider(int parseMode, AMapper<?> mapper){
public JsonSmartJsonProvider(int parseMode, JsonReaderI<?> mapper){
this.parseMode = parseMode;
this.mapper = mapper;
}
@Deprecated
public JsonSmartJsonProvider(Mode mode) {
this(mode.intValue(), DefaultMapperOrdered.DEFAULT);
this(mode.intValue(), JSONValue.defaultReader.DEFAULT_ORDERED);
}
public Object createArray() {

Loading…
Cancel
Save