Code example for JsonPrimitive

	private static class DateTimeTypeConverter implements JsonSerializer<DateTime>,
			JsonDeserializer<DateTime> {
		public JsonElement serialize(DateTime src, Type srcType,
				JsonSerializationContext context) {
			return new JsonPrimitive(src.toString());
		public DateTime deserialize(JsonElement json, Type type,
				JsonDeserializationContext context) throws JsonParseException {
			//System.out.println("Deser.." + json.getAsString()); 
			try { 
				return new DateTime(json.getAsString());
			} catch (IllegalArgumentException e) {
				// May be it came in formatted as a java.util.Date, so try that 
				Date date = context.deserialize(json, Date.class);
				return new DateTime(date);