package org.jstrava.connector;

import java.lang.reflect.Type;

//import javax.measure.Quantity;

import com.google.gson.JsonDeserializationContext;
import com.google.gson.JsonDeserializer;
import com.google.gson.JsonElement;
import com.google.gson.JsonObject;
import com.google.gson.JsonParseException;

public class QuantityDeserializer implements JsonDeserializer<Number> {



	    @Override
	    public Number deserialize(JsonElement json, Type typeOfT, JsonDeserializationContext context)
	            throws JsonParseException {
	        try {
	            JsonObject obj = (JsonObject) json;
	            Class clazz = Class.forName(obj.get("class").getAsString());
	            return (Number) clazz.newInstance();
	        } catch (Exception e) {
	            throw new JsonParseException(e.getMessage());
	        }
	    }

	}
@@ -298,16 +298,141 @@
 ption;%0A%0A
+/**%0A * @deprecated should be removed, as full JSON binding to custom types doesn't work well, See uom-strava for more...%0A */%0A
 public c
@@ -954,8 +954,9 @@
    %7D%0A%0A%09%7D
+%0A

Update QuantityDeserializer.java