本文整理了Java中org.apache.pinot.common.utils.JsonUtils.jsonNodeToObject()
方法的一些代码示例,展示了JsonUtils.jsonNodeToObject()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JsonUtils.jsonNodeToObject()
方法的具体详情如下:
包路径:org.apache.pinot.common.utils.JsonUtils
类名称:JsonUtils
方法名:jsonNodeToObject
暂无
代码示例来源:origin: apache/incubator-pinot
/**
* Extracts the child config from the table config.
* <p>
* NOTE: for historical reason, we support two kinds of nested config values: normal json and serialized json string
*/
private static <T> T extractChildConfig(JsonNode jsonConfig, String childConfigKey, Class<T> childConfigClass)
throws IOException {
JsonNode childConfigNode = jsonConfig.get(childConfigKey);
if (childConfigNode.isObject()) {
return JsonUtils.jsonNodeToObject(childConfigNode, childConfigClass);
} else {
return JsonUtils.stringToObject(childConfigNode.asText(), childConfigClass);
}
}
代码示例来源:origin: apache/incubator-pinot
@Override
public T deserialize(PinotRecord record)
throws IOException {
ObjectNode jsonRecord = JsonUtils.newObjectNode();
for (String column : _schema.getColumnNames()) {
jsonRecord.set(column, JsonUtils.objectToJsonNode(record.getValue(column)));
}
return JsonUtils.jsonNodeToObject(jsonRecord, getJsonReaderClass(_conf));
}
内容来源于网络,如有侵权,请联系作者删除!