|
|
@ -18,6 +18,7 @@ import com.jayway.jsonpath.InvalidJsonException; |
|
|
|
import com.jayway.jsonpath.spi.Mode; |
|
|
|
import com.jayway.jsonpath.spi.Mode; |
|
|
|
import net.minidev.json.JSONArray; |
|
|
|
import net.minidev.json.JSONArray; |
|
|
|
import net.minidev.json.JSONObject; |
|
|
|
import net.minidev.json.JSONObject; |
|
|
|
|
|
|
|
import net.minidev.json.parser.ContainerFactory; |
|
|
|
import net.minidev.json.parser.JSONParser; |
|
|
|
import net.minidev.json.parser.JSONParser; |
|
|
|
import net.minidev.json.parser.ParseException; |
|
|
|
import net.minidev.json.parser.ParseException; |
|
|
|
|
|
|
|
|
|
|
@ -55,7 +56,7 @@ public class JsonSmartJsonProvider extends AbstractJsonProvider { |
|
|
|
|
|
|
|
|
|
|
|
public Object parse(String json) { |
|
|
|
public Object parse(String json) { |
|
|
|
try { |
|
|
|
try { |
|
|
|
return parser.parse(json); |
|
|
|
return parser.parse(json, ContainerFactory.FACTORY_ORDERED); |
|
|
|
} catch (ParseException e) { |
|
|
|
} catch (ParseException e) { |
|
|
|
throw new InvalidJsonException(e); |
|
|
|
throw new InvalidJsonException(e); |
|
|
|
} |
|
|
|
} |
|
|
@ -64,7 +65,7 @@ public class JsonSmartJsonProvider extends AbstractJsonProvider { |
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public Object parse(Reader jsonReader) throws InvalidJsonException { |
|
|
|
public Object parse(Reader jsonReader) throws InvalidJsonException { |
|
|
|
try { |
|
|
|
try { |
|
|
|
return parser.parse(jsonReader); |
|
|
|
return parser.parse(jsonReader, ContainerFactory.FACTORY_ORDERED); |
|
|
|
} catch (ParseException e) { |
|
|
|
} catch (ParseException e) { |
|
|
|
throw new InvalidJsonException(e); |
|
|
|
throw new InvalidJsonException(e); |
|
|
|
} |
|
|
|
} |
|
|
@ -73,7 +74,7 @@ public class JsonSmartJsonProvider extends AbstractJsonProvider { |
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public Object parse(InputStream jsonStream) throws InvalidJsonException { |
|
|
|
public Object parse(InputStream jsonStream) throws InvalidJsonException { |
|
|
|
try { |
|
|
|
try { |
|
|
|
return parser.parse(new InputStreamReader(jsonStream)); |
|
|
|
return parser.parse(new InputStreamReader(jsonStream), ContainerFactory.FACTORY_ORDERED); |
|
|
|
} catch (ParseException e) { |
|
|
|
} catch (ParseException e) { |
|
|
|
throw new InvalidJsonException(e); |
|
|
|
throw new InvalidJsonException(e); |
|
|
|
} |
|
|
|
} |
|
|
|