@Test public void shouldReadJsonJobSpec() throws Exception { String jobSpec = IOUtils.toString(getClass().getResourceAsStream("job.json"), UTF_8); final Job job = NomadJson.readJobSpec(jobSpec); assertThat(job.getId(), is("Job-ID")); }
public static Job readJobSpec(String jobSpec) throws IOException { return OBJECT_MAPPER.readValue(jobSpec, JobSpec.class).job; }
NomadJson { public static Job readJobSpec(String jobSpec) throws IOException { return OBJECT_MAPPER.readValue(jobSpec, JobSpec.class).job; } }
NomadJson { public static Job readJobSpec(String jobSpec) throws IOException { return OBJECT_MAPPER.readValue(jobSpec, JobSpec.class).job; }  }
NomadJson { public static Job readJobSpec(String jobSpec) throws IOException { return OBJECT_MAPPER.readValue(jobSpec, JobSpec.class).job; }  static Job readJobSpec(String jobSpec); static String asJobSpec(Job job); static String serialize(Object value); static T deserialize(String json, Class<T> clazz); static List<T> deserializeList(String json, Class<T> clazz); }
NomadJson { public static Job readJobSpec(String jobSpec) throws IOException { return OBJECT_MAPPER.readValue(jobSpec, JobSpec.class).job; }  static Job readJobSpec(String jobSpec); static String asJobSpec(Job job); static String serialize(Object value); static T deserialize(String json, Class<T> clazz); static List<T> deserializeList(String json, Class<T> clazz);  }