Code example for JsonPrimitive

Methods: getAsStringisBooleanisString

0
		return map;
	} 
	 
	 
	public Object json2JavaPrimitive(JsonPrimitive prim) {
		if(prim.isBoolean()) {
			return prim.getAsBoolean();
		} else if (prim.isString()) {
			return prim.getAsString();
		} else if (prim.isNumber()) {
			return prim.getAsNumber();
		} else { 
			throw new IllegalStateException();
		} 
	} 
 
} 
Connect your IDE to all the code out there  Get Codota for Java