Code example for Gson

Methods: fromJson

0
		String id = StringHelper.makeSHA1Hash(json);
 
		Session session;
		Gson gson = GsonUtil.getDefault();
 
		session = gson.fromJson(json, Session.class);
		session.setId(id);
		return session;
	} 
 
	public void setId(String id) {
		this.id = id;
	} 
 
	@Id 
	public String getId() {
		return id;
	} 
 
	@Column(name = "map_base_layer") 
Experience pair programming with AI  Get Codota for Java