Code example for GsonBuilder

Methods: registerTypeAdapter

0
	 
	@Override 
	public GsonBuilder extendBuilder(GsonBuilder gp) {
		// Serialization: 
		if (null != _dataMap) {
			gp = _dataMap.extendBuilder(gp);
		} 
		// Deserialization: 
		else if ((null != _type1) || (null != _listType1)) {
			gp = gp.registerTypeAdapter(ResponsePojo.class, new ResponsePojoDeserializer(_type1, _listType1));
		} 
		else if ((null != _type2) || (null != _listType2)) {
			gp = gp.registerTypeAdapter(ResponsePojo.class, new ResponsePojoDeserializer(_type2, _listType2, _deserMap));
		} 
		else { 
			gp = gp.registerTypeAdapter(ResponsePojo.class, new ResponsePojoDeserializer());
		} 
		return gp;
	} 
 
	protected static class ResponsePojoDeserializer implements JsonDeserializer<ResponsePojo> 
Experience pair programming with AI  Get Codota for Java