class StringToNumberDecoder implements RpcDecoder {

    @Override
    public boolean isApplicable(JsonValue value, Class<?> type) {
        return value.getType().equals(JsonType.STRING)
                && Number.class.isAssignableFrom(type)
                && type.getPackage().equals(Integer.class.getPackage());
    }

}