duracloud/duracloud · JaxbJsonSerializer.java
java logo
public T deserialize(String json) throws IOException {
        return (T) mapper.readValue(json, type);
    }
Similar code snippets
1.
GetStream/stream-java · Serialization.java
Match rating: 70.28% · See similar code snippets
java logo
public static <T> T fromJSON(InputStream json, Class<T> type) throws IOException {
        return mapper.readValue(json, type);
    }
2.
Multifarious/MacroManager · JsonUtil.java
Match rating: 68.07% · See similar code snippets
java logo
public static <T> T fromJSON(String json, Class<T> cls) throws IOException {
        return MAPPER.readValue(json, cls);
    }
3.
hawkular/hawkular-commons · JsonUtil.java
Match rating: 66.98% · See similar code snippets
java logo
public static <T> T fromJson(String json, Class<T> clazz) {
        try {
            return MAPPER.readValue(json, clazz);
        } catch (IOException e) {
            throw new IllegalStateException(e);
        }
    }
4.
Match rating: 65.6% · See similar code snippets
java logo
private T deserialize(ObjectMapper mapper, String json, JavaType javaType) throws IOException {
    if (json == null || json.isEmpty()) {
      json = defaultValue;
    }

    if (json == null) {
      return null;
    } else {
      return mapper.readValue(json, javaType);
    }
  }
5.
agmip/agmip-core · JSONAdapter.java
Match rating: 64.87% · See similar code snippets
java logo
public static HashMap<String, Object> fromJSON(String json) throws IOException {
        return mapper.readValue(json, new TypeReference<HashMap<String, Object>>() {});
    }
6.
signalapp/libsignal-service-java · JsonUtil.java
Match rating: 64.16% · See similar code snippets
java logo
public static <T> T fromJson(String json, Class<T> clazz)
      throws IOException
  {
    return objectMapper.readValue(json, clazz);
  }
7.
arakelian/jackson-utils · JacksonUtils.java
Match rating: 64.0% · See similar code snippets
java logo
public static <T> T readValue(final String json, final Class<T> type) throws IOException {
        return readValue(getObjectMapper(), json, type);
    }
8.
apache/incubator-atlas · AtlasType.java
Match rating: 63.79% · See similar code snippets
java logo
public static <T> T fromJson(String jsonStr, Class<T> type) {
        T ret;
        try {
            ret =  mapper.readValue(jsonStr, type);
        }catch (IOException e){
            ret = null;
        }
        return ret;
    }
9.
authorjapps/zerocode · SmartUtils.java
Match rating: 63.4% · See similar code snippets
java logo
public <T> T jsonFileToJava(String jsonFileName, Class<T> clazz) throws IOException {
        return mapper.readValue(readJsonAsString(jsonFileName), clazz);
    }
10.
deeplearning4j/deeplearning4j · JsonMapper.java
Match rating: 63.25% · See similar code snippets
java logo
public static <T> T fromJson(String json, Class<? extends T> type){
        try{
            return getMapper().readValue(json, type);
        } catch (IOException e) {
            throw new RuntimeException(e);
        }
    }