|
|
@ -23,12 +23,9 @@ import org.slf4j.LoggerFactory; |
|
|
|
|
|
|
|
|
|
|
|
import java.io.IOException; |
|
|
|
import java.io.IOException; |
|
|
|
import java.io.InputStream; |
|
|
|
import java.io.InputStream; |
|
|
|
import java.io.Reader; |
|
|
|
|
|
|
|
import java.io.StringWriter; |
|
|
|
import java.io.StringWriter; |
|
|
|
import java.util.LinkedHashMap; |
|
|
|
|
|
|
|
import java.util.LinkedList; |
|
|
|
import java.util.LinkedList; |
|
|
|
import java.util.List; |
|
|
|
import java.util.List; |
|
|
|
import java.util.Map; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public class JacksonProvider extends AbstractJsonProvider { |
|
|
|
public class JacksonProvider extends AbstractJsonProvider { |
|
|
|
|
|
|
|
|
|
|
@ -75,15 +72,6 @@ public class JacksonProvider extends AbstractJsonProvider { |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
|
|
|
public Object parse(Reader jsonReader) throws InvalidJsonException { |
|
|
|
|
|
|
|
try { |
|
|
|
|
|
|
|
return objectReader.readValue(jsonReader); |
|
|
|
|
|
|
|
} catch (IOException e) { |
|
|
|
|
|
|
|
throw new InvalidJsonException(e); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public Object parse(InputStream jsonStream) throws InvalidJsonException { |
|
|
|
public Object parse(InputStream jsonStream) throws InvalidJsonException { |
|
|
|
try { |
|
|
|
try { |
|
|
@ -108,11 +96,6 @@ public class JacksonProvider extends AbstractJsonProvider { |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
|
|
|
public Map<String, Object> createMap() { |
|
|
|
|
|
|
|
return new LinkedHashMap<String, Object>(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public List<Object> createArray() { |
|
|
|
public List<Object> createArray() { |
|
|
|
return new LinkedList<Object>(); |
|
|
|
return new LinkedList<Object>(); |
|
|
|