@Test @Ignore public void testDeser() throws IOException { final String json = "[{\"jobMetadata\":{\"jobId\":{\"jobNum\":1,\"cluster\":\"sine-function\",\"id\":\"sine-function-1\"},\"submittedAt\":1526923218174,\"jobDefinition\":{\"name\":\"sine-function\",\"user\":\"nmahilani\",\"artifactName\":\"\",\"version\":\"0.1.39 2018-03-13 09:40:53\",\"parameters\":[],\"jobSla\":{\"runtimeLimitSecs\":0,\"minRuntimeSecs\":0,\"slaType\":\"Lossy\",\"durationType\":\"Perpetual\",\"userProvidedType\":\"\"},\"subscriptionTimeoutSecs\":0,\"schedulingInfo\":{\"stages\":{\"1\":{\"numberOfInstances\":1,\"machineDefinition\":{\"cpuCores\":1.0,\"memoryMB\":1024.0,\"networkMbps\":128.0,\"diskMB\":1024.0,\"numPorts\":1},\"hardConstraints\":[],\"softConstraints\":[],\"scalingPolicy\":null,\"scalable\":true}}},\"numberOfStages\":1,\"labels\":[]},\"state\":\"Launched\",\"nextWorkerNumberToUse\":10,\"startedAt\":-1,\"endedAt\":-1,\"parameters\":[],\"user\":\"nmahilani\",\"labels\":[],\"clusterName\":\"sine-function\",\"submittedAtInstant\":{\"epochSecond\":1526923218,\"nano\":174000000},\"jobJarUrl\":\"http:\",\"startedAtInstant\":null,\"sla\":{\"runtimeLimitSecs\":0,\"minRuntimeSecs\":0,\"slaType\":\"Lossy\",\"durationType\":\"Perpetual\",\"userProvidedType\":\"\"},\"subscriptionTimeoutSecs\":0,\"minRuntimeSecs\":0,\"endedAtInstant\":null},\"stageMetadataList\":[],\"workerMetadataList\":[]}]"; List<MantisJobMetadataView> mantisJobMetadataViews = Jackson.fromJSON(json, new TypeReference<List<MantisJobMetadataView>>() { }); System.out.println(mantisJobMetadataViews.toString()); }
public static <T> T fromJSON( ObjectMapper mapper, String json, TypeReference<T> expectedType) throws IOException { return mapper.readerFor(expectedType).readValue(json); }
Jackson { public static <T> T fromJSON( ObjectMapper mapper, String json, TypeReference<T> expectedType) throws IOException { return mapper.readerFor(expectedType).readValue(json); } }
Jackson { public static <T> T fromJSON( ObjectMapper mapper, String json, TypeReference<T> expectedType) throws IOException { return mapper.readerFor(expectedType).readValue(json); }  }
Jackson { public static <T> T fromJSON( ObjectMapper mapper, String json, TypeReference<T> expectedType) throws IOException { return mapper.readerFor(expectedType).readValue(json); }  static Marshaller<T, RequestEntity> marshaller(); static Marshaller<T, RequestEntity> marshaller(FilterProvider filterProvider); static Marshaller<T, RequestEntity> marshaller(ObjectMapper mapper); static Marshaller<T, RequestEntity> marshaller(
            ObjectMapper mapper,
            FilterProvider filterProvider); static Unmarshaller<HttpEntity, T> unmarshaller(Class<T> expectedType); static Unmarshaller<HttpEntity, T> unmarshaller(TypeReference<T> expectedType); static Unmarshaller<HttpEntity, T> unmarshaller(
            ObjectMapper mapper,
            Class<T> expectedType); static Unmarshaller<HttpEntity, T> unmarshaller(
            ObjectMapper mapper,
            TypeReference<T> expectedType); static T fromJSON(
            ObjectMapper mapper,
            String json,
            TypeReference<T> expectedType); static T fromJSON(
            ObjectMapper mapper,
            String json,
            Class<T> expectedType); static T fromJSON(String json, Class<T> expectedType); static T fromJSON(String json, TypeReference<T> expectedType); static String toJson(Object object); }
Jackson { public static <T> T fromJSON( ObjectMapper mapper, String json, TypeReference<T> expectedType) throws IOException { return mapper.readerFor(expectedType).readValue(json); }  static Marshaller<T, RequestEntity> marshaller(); static Marshaller<T, RequestEntity> marshaller(FilterProvider filterProvider); static Marshaller<T, RequestEntity> marshaller(ObjectMapper mapper); static Marshaller<T, RequestEntity> marshaller(
            ObjectMapper mapper,
            FilterProvider filterProvider); static Unmarshaller<HttpEntity, T> unmarshaller(Class<T> expectedType); static Unmarshaller<HttpEntity, T> unmarshaller(TypeReference<T> expectedType); static Unmarshaller<HttpEntity, T> unmarshaller(
            ObjectMapper mapper,
            Class<T> expectedType); static Unmarshaller<HttpEntity, T> unmarshaller(
            ObjectMapper mapper,
            TypeReference<T> expectedType); static T fromJSON(
            ObjectMapper mapper,
            String json,
            TypeReference<T> expectedType); static T fromJSON(
            ObjectMapper mapper,
            String json,
            Class<T> expectedType); static T fromJSON(String json, Class<T> expectedType); static T fromJSON(String json, TypeReference<T> expectedType); static String toJson(Object object); static final SimpleFilterProvider DEFAULT_FILTER_PROVIDER; }