@Override public List<Species> decode(InputStream inputStream) throws IOException { return JacksonHelper.readListValue( JacksonHelper.OBJECT_MAPPER.readTree(inputStream).get("species"), Species.class); }
@Override public byte[] encode(List<Species> speciesList) throws JsonProcessingException { return JacksonHelper.OBJECT_MAPPER.writer().writeValueAsBytes(speciesList); }