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

The following examples show how to use gherkin.deps.com.google.gson.Gson. These examples are extracted from open source projects. 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   Source 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));
}