2 Minutes To Code (β Version)

JSON and gson api - 2 minute tutorial

PrimitivesBag.java - Source code of artefact used in this tutorial

Given below is the source code of class com.techfundaes.gsonBag.PrimitivesBag which is used in earlier examples.
package com.techfundaes.gsonBag;

		public class PrimitivesBag
			int year = 2012;
			long seconds ;
			double percent = 81.23;
			boolean isUser = false;
			String dept = null;
			String name = "john";
			public String toString() {
				StringBuilder builder = new StringBuilder();
				builder.append("PrimitivesBag [year=").append(year)
						.append(", seconds=").append(seconds).append(", percent=")
						.append(percent).append(", isUser=").append(isUser)
						.append(", dept=").append(dept).append(", name=").append(name)
				return builder.toString();