use of cwms.radar.api.errors.JsonFieldsException in project cwms-radar-api by USACE.
the class LevelsController method deserializeLocationLevel.
public static LocationLevel deserializeLocationLevel(String body, String format, String office) {
ObjectMapper om = getObjectMapperForFormat(format);
LocationLevel retVal;
try {
retVal = new LocationLevel.Builder(om.readValue(body, LocationLevel.class)).withOfficeId(office).build();
return retVal;
} catch (JsonProcessingException e) {
throw new JsonFieldsException(e);
}
}
Aggregations