com.swisscom.cloud.sb.broker.cfapi.converter.MetadataJsonHelper.groovy Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of broker Show documentation
Show all versions of broker Show documentation
Swisscom's Open Service Broker API implementation
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