gherkin.deps.com.google.gson.Gson Java Examples

The following examples show how to use gherkin.deps.com.google.gson.Gson. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source Project: qaf   Author: qmetry   File: Item.java    License: MIT License 5 votes vote down vote up
public static void main(String[] args) {
	Map<Object, Object> m = Maps.newHashMap();
	m.put("name", "a");
	m.put("uname", "a");

	m.put("id", 1);
	
  Item item = new Gson().fromJson(new Gson().toJson(m), Item.class);
  System.out.println(new Gson().toJson(item));
}