View Javadoc
1   package org.oxerr.chbtc.dto.valuereader;
2   
3   import java.io.IOException;
4   
5   import org.apache.commons.lang3.StringUtils;
6   import org.oxerr.chbtc.dto.Depth;
7   
8   import com.fasterxml.jackson.databind.ObjectMapper;
9   
10  /**
11   * This class is only to adapt the malformed depth JSON data.
12   */
13  public class DepthReader extends JsonValueReader<Depth>{
14  
15  	public DepthReader(final ObjectMapper objectMapper) {
16  		super(objectMapper, Depth.class);
17  	}
18  
19  	@Override
20  	protected Depth read(String content) throws IOException {
21  		String replaced = StringUtils.replace(content, ",[[", ",[");
22  		return super.read(replaced);
23  	}
24  
25  }