All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.swisscom.cloud.sb.broker.cfapi.converter.MetadataJsonHelper.groovy Maven / Gradle / Ivy

There is a newer version: 6.21.6
Show newest version
package com.swisscom.cloud.sb.broker.cfapi.converter

class MetadataJsonHelper {
    public static Object getValue(String type, Object value) {
        if (!type) {
            return value
        }
        switch (type.toLowerCase()) {
            case 'bool':
            case 'boolean':
                return Boolean.valueOf(value)
            case 'int':
            case 'integer':
                return Integer.valueOf(value)
            case 'long':
                return Long.valueOf(value)
            default:
                return value
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy