package me.hfox.morphix.mapping.field;

import me.hfox.morphix.Morphix;

import java.lang.reflect.Field;

public class ObjectMapper<T> extends FieldMapper<T> {

    public ObjectMapper(Class<T> type, Class<?> parent, Field field, Morphix morphix) {
        super(type, parent, field, morphix);
    }

    @Override
    public Object marshal(Object obj) {
        return obj;
    }

    @Override
    public Object unmarshal(Object obj) {
        return obj;
    }

}

@@ -340,32 +340,960 @@
 l(Object obj) %7B%0A
+        if (obj instanceof Number) %7B%0A            Number num = (Number) obj;%0A            if (Integer.class.equals(obj.getClass()) %7C%7C int.class.equals(obj.getClass())) %7B%0A                return num.intValue();%0A            %7D else if (Double.class.equals(obj.getClass()) %7C%7C double.class.equals(obj.getClass())) %7B%0A                return num.doubleValue();%0A            %7D else if (Float.class.equals(obj.getClass()) %7C%7C float.class.equals(obj.getClass())) %7B%0A                return num.floatValue();%0A            %7D else if (Byte.class.equals(obj.getClass()) %7C%7C byte.class.equals(obj.getClass())) %7B%0A                return num.byteValue();%0A            %7D else if (Short.class.equals(obj.getClass()) %7C%7C short.class.equals(obj.getClass())) %7B%0A                return num.byteValue();%0A            %7D else if (Long.class.equals(obj.getClass()) %7C%7C long.class.equals(obj.getClass())) %7B%0A                return num.byteValue();%0A            %7D%0A        %7D%0A%0A
         return o

Update ObjectMapper