Code example for Gson

Methods: fromJson

0
		Gson gson = new Gson();
		jsonElement = gson.toJsonTree(payload);
	} 
 
	public <PayloadType> PayloadType get(Class<PayloadType> type) {
		Gson gson = new Gson();
		return gson.fromJson(jsonElement, type);
	} 
 
	public JsonElement getGsonElement() {
		return jsonElement;
	} 
	 
	@Override 
	public boolean equals(Object obj) {
		return EqualsBuilder.reflectionEquals(this, obj);
	} 
 
	private JsonElement jsonElement;