restygwt/src/main/java/org/fusesource/restygwt/client/AbstractJsonEncoderDecoder.java
public static BigDecimal toBigDecimal(JSONValue value) {
        JSONNumber number = value.isNumber();
        if (number != null) {
            return new BigDecimal(number.toString());
        }

        JSONString string = value.isString();
        if (string != null) {
            try {
                return new BigDecimal(string.stringValue());
            } catch (NumberFormatException e) {
            }
        }

        throw new DecodingException("Expected a json number, but was given: " + value);
    }
public static BigDecimal toBigDecimal(JSONValue value) {
        JSONNumber number = value.isNumber();
        if (number != null) {
            return new BigDecimal(number.toString());
        }

        JSONString string = value.isString();
        if (string != null) {
            try {
                return new BigDecimal(string.stringValue());
            } catch (NumberFormatException e) {
            }
        }

        throw new DecodingException("Expected a json number, but was given: " + value);
    }
/////////////////////////////////////////////////////////////////