BluePrintConstants.DATA_TYPE_FLOAT,
BluePrintConstants.DATA_TYPE_DOUBLE,
BluePrintConstants.DATA_TYPE_TIMESTAMP,
- BluePrintConstants.DATA_TYPE_STRING ->
+ BluePrintConstants.DATA_TYPE_STRING,
+ BluePrintConstants.DATA_TYPE_NULL ->
objectNode.set(key, value)
else -> throw BluePrintException("populatePrimitiveValues expected only primitive values! Received: ($value)")
}
BluePrintConstants.DATA_TYPE_FLOAT,
BluePrintConstants.DATA_TYPE_DOUBLE,
BluePrintConstants.DATA_TYPE_TIMESTAMP,
- BluePrintConstants.DATA_TYPE_STRING -> arrayNode.add(value)
+ BluePrintConstants.DATA_TYPE_STRING,
+ BluePrintConstants.DATA_TYPE_NULL ->
+ arrayNode.add(value)
else -> throw BluePrintException("populatePrimitiveValues expected only primitive values! Received: ($value)")
}
}
}
}
- fun populateJsonNodeValues(key: String, nodeValue: JsonNode, type: String, objectNode: ObjectNode) {
+ fun populateJsonNodeValues(key: String, nodeValue: JsonNode?, type: String, objectNode: ObjectNode) {
if (nodeValue == null || nodeValue is NullNode) {
objectNode.set(key, nodeValue)
} else if (BluePrintTypes.validPrimitiveTypes().contains(type)) {