summaryrefslogtreecommitdiffstats
path: root/components
diff options
context:
space:
mode:
Diffstat (limited to 'components')
-rw-r--r--components/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/utils/JacksonUtils.kt5
1 files changed, 5 insertions, 0 deletions
diff --git a/components/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/utils/JacksonUtils.kt b/components/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/utils/JacksonUtils.kt
index 5075e7261..cf5f9e20c 100644
--- a/components/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/utils/JacksonUtils.kt
+++ b/components/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/utils/JacksonUtils.kt
@@ -50,6 +50,11 @@ object JacksonUtils {
}
@JvmStatic
+ fun <T> readValue(node: JsonNode, valueType: Class<T>): T? {
+ return jacksonObjectMapper().treeToValue(node, valueType)
+ }
+
+ @JvmStatic
fun getContent(fileName: String): String {
return File(fileName).readText(Charsets.UTF_8)
}