diff --git a/src/main/java/fr/pandacube/java/util/TypeConverter.java b/src/main/java/fr/pandacube/java/util/TypeConverter.java
new file mode 100644
index 0000000..294dc6a
--- /dev/null
+++ b/src/main/java/fr/pandacube/java/util/TypeConverter.java
@@ -0,0 +1,218 @@
+package fr.pandacube.java.util;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import com.google.gson.Gson;
+import com.google.gson.JsonElement;
+
+/**
+ * Utility for conversion of basic Java types and JsonElements types
+ * @author Marc
+ *
+ */
+public class TypeConverter {
+
+
+ public static Integer toInteger(Object o) {
+ if (o == null) {
+ return null;
+ }
+
+ if (o instanceof JsonElement) {
+ try {
+ return ((JsonElement)o).getAsInt();
+ } catch(UnsupportedOperationException e) {
+ throw new ConvertionException(e);
+ }
+ }
+
+ if (o instanceof Number) {
+ return ((Number)o).intValue();
+ }
+ if (o instanceof String) {
+ try {
+ return Integer.parseInt((String)o);
+ } catch (NumberFormatException e) {
+ throw new ConvertionException(e);
+ }
+ }
+ if (o instanceof Boolean) {
+ return ((Boolean)o) ? 1 : 0;
+ }
+
+ throw new ConvertionException("No integer convertion available for an instance of "+o.getClass());
+ }
+
+ public static int toPrimInt(Object o) {
+ Integer val = toInteger(o);
+ if (val == null)
+ throw new ConvertionException("null values can't converted to primitive int");
+ return val;
+ }
+
+ public static Double toDouble(Object o) {
+ if (o == null) {
+ return null;
+ }
+
+ if (o instanceof JsonElement) {
+ try {
+ return ((JsonElement)o).getAsDouble();
+ } catch(UnsupportedOperationException e) {
+ throw new ConvertionException(e);
+ }
+ }
+
+ if (o instanceof Number) {
+ return ((Number)o).doubleValue();
+ }
+ if (o instanceof String) {
+ try {
+ return Double.parseDouble((String)o);
+ } catch (NumberFormatException e) {
+ throw new ConvertionException(e);
+ }
+ }
+ if (o instanceof Boolean) {
+ return ((Boolean)o) ? 1d : 0d;
+ }
+
+ throw new ConvertionException("No double convertion available for an instance of "+o.getClass());
+
+ }
+
+ public static double toPrimDouble(Object o) {
+ Double val = toDouble(o);
+ if (val == null)
+ throw new ConvertionException("null values can't converted to primitive int");
+ return val;
+ }
+
+ public static String toString(Object o) {
+ if (o == null) {
+ return null;
+ }
+
+ if (o instanceof JsonElement) {
+ try {
+ return ((JsonElement)o).getAsString();
+ } catch(UnsupportedOperationException e) {
+ throw new ConvertionException(e);
+ }
+ }
+
+ if (o instanceof Number || o instanceof String || o instanceof Boolean || o instanceof Character) {
+ return o.toString();
+ }
+
+ throw new ConvertionException("No string convertion available for an instance of "+o.getClass());
+
+ }
+
+ /**
+ *
+ * @param o the object to convert to good type
+ * @param mapIntKeys if the String key representing an int should be duplicated as integer type,
+ * which map to the same value as the original String key. For example, if a key is "12" and map
+ * to the object o, an integer key 12 will be added and map to the same object
+ * o
+ * @return
+ */
+ @SuppressWarnings("unchecked")
+ public static Map