com.jn.easyjson.jackson.ext.EasyjsonJsonParser Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of easyjson-jackson Show documentation
Show all versions of easyjson-jackson Show documentation
Adapter easyjson to Jackson
The newest version!
package com.jn.easyjson.jackson.ext;
import com.fasterxml.jackson.core.JsonParser;
import com.fasterxml.jackson.core.JsonToken;
import com.fasterxml.jackson.core.util.JsonParserDelegate;
import java.io.IOException;
/**
* 为处理数组中的 , 后面没有值的情况加的
*/
public class EasyjsonJsonParser extends JsonParserDelegate {
public EasyjsonJsonParser(JsonParser d) {
super(d);
}
@Override
public JsonToken nextToken() throws IOException {
try {
return super.nextToken();
}catch (ArrayCommaException e){
JsonToken jsonToken = nextToken();
return jsonToken;
}
}
}