com.avaje.ebean.text.json.EJsonReader Maven / Gradle / Ivy
package com.avaje.ebean.text.json;
import java.io.IOException;
import java.io.Reader;
import java.io.StringReader;
import java.util.ArrayList;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import java.util.NoSuchElementException;
import com.avaje.ebeaninternal.server.type.ModifyAwareFlag;
import com.avaje.ebeaninternal.server.type.ModifyAwareList;
import com.avaje.ebeaninternal.server.type.ModifyAwareMap;
import com.avaje.ebeaninternal.server.type.ModifyAwareOwner;
import com.fasterxml.jackson.core.JsonFactory;
import com.fasterxml.jackson.core.JsonParser;
import com.fasterxml.jackson.core.JsonToken;
class EJsonReader {
static final JsonFactory json = new JsonFactory();
@SuppressWarnings("unchecked")
static Map parseObject(String json, boolean modifyAware) throws IOException {
return (Map) parse(json, modifyAware);
}
@SuppressWarnings("unchecked")
static Map parseObject(String json) throws IOException {
return (Map) parse(json);
}
@SuppressWarnings("unchecked")
static Map parseObject(Reader reader) throws IOException {
return (Map) parse(reader);
}
@SuppressWarnings("unchecked")
static Map parseObject(Reader reader, boolean modifyAware) throws IOException {
return (Map) parse(reader, modifyAware);
}
@SuppressWarnings("unchecked")
static Map parseObject(JsonParser parser) throws IOException {
return (Map) parse(parser);
}
@SuppressWarnings("unchecked")
static Map parseObject(JsonParser parser, JsonToken token) throws IOException {
return (Map)parse(parser, token, false);
}
@SuppressWarnings("unchecked")
static List