本文整理了Java中org.codehaus.jackson.JsonNode.getFieldNames()
方法的一些代码示例,展示了JsonNode.getFieldNames()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JsonNode.getFieldNames()
方法的具体详情如下:
包路径:org.codehaus.jackson.JsonNode
类名称:JsonNode
方法名:getFieldNames
[英]Method for accessing names of all fields for this Node, iff this node is a JSON Object node.
[中]方法访问此节点的所有字段的名称,如果此节点是JSON对象节点。
代码示例来源:origin: apache/nifi
private Set<String> getNormalizedColumnNames(final JsonNode node, final boolean translateFieldNames) {
final Set<String> normalizedFieldNames = new HashSet<>();
final Iterator<String> fieldNameItr = node.getFieldNames();
while (fieldNameItr.hasNext()) {
normalizedFieldNames.add(normalizeColumnName(fieldNameItr.next(), translateFieldNames));
}
return normalizedFieldNames;
}
代码示例来源:origin: org.apache.avro/avro
private void parseProps(JsonNode json) {
for (Iterator<String> i = json.getFieldNames(); i.hasNext();) {
String p = i.next(); // add non-reserved as props
if (!PROTOCOL_RESERVED.contains(p))
this.addProp(p, json.get(p));
}
}
代码示例来源:origin: org.apache.avro/avro
private void parseMessages(JsonNode json) {
JsonNode defs = json.get("messages");
if (defs == null) return; // no messages defined
for (Iterator<String> i = defs.getFieldNames(); i.hasNext();) {
String prop = i.next();
this.messages.put(prop, parseMessage(prop, defs.get(prop)));
}
}
代码示例来源:origin: soabase/exhibitor
Iterator<String> fieldNames = backupExtra.getFieldNames();
while ( fieldNames.hasNext() )
Iterator<String> fieldNames = zooCfgExtra.getFieldNames();
while ( fieldNames.hasNext() )
代码示例来源:origin: apache/nifi
final Iterator<String> fieldNames = rootNode.getFieldNames();
while (fieldNames.hasNext()) {
final String fieldName = fieldNames.next();
代码示例来源:origin: apache/nifi
final Iterator<String> fieldNames = rootNode.getFieldNames();
while (fieldNames.hasNext()) {
final String fieldName = fieldNames.next();
代码示例来源:origin: azkaban/azkaban
private static Object toObjectFromJSONNode(final JsonNode node) {
if (node.isObject()) {
final HashMap<String, Object> obj = new HashMap<>();
final Iterator<String> iter = node.getFieldNames();
while (iter.hasNext()) {
final String fieldName = iter.next();
代码示例来源:origin: apache/nifi
Iterator<String> fieldNames = rootNode.getFieldNames();
while (fieldNames.hasNext()) {
final String fieldName = fieldNames.next();
fieldNames = rootNode.getFieldNames();
int whereFieldCount = 0;
while (fieldNames.hasNext()) {
代码示例来源:origin: apache/usergrid
Iterator<String> fieldNames = orgsNode.getFieldNames();
代码示例来源:origin: apache/nifi
final Iterator<String> fieldNameItr = fieldNode.getFieldNames();
while (fieldNameItr.hasNext()) {
final String childName = fieldNameItr.next();
final Iterator<String> fieldNameItr = fieldNode.getFieldNames();
while (fieldNameItr.hasNext()) {
fields.add(new RecordField(fieldNameItr.next(), RecordFieldType.STRING.getDataType()));
代码示例来源:origin: apache/nifi
final Iterator<String> fieldNames = jsonNode.getFieldNames();
while (fieldNames.hasNext()) {
final String fieldName = fieldNames.next();
代码示例来源:origin: org.apache.avro/avro
for (Iterator<String> i = json.getFieldNames(); i.hasNext();) {
Iterator<String> i = field.getFieldNames();
while (i.hasNext()) { // add properties
String prop = i.next();
代码示例来源:origin: apache/nifi
final Iterator<String> fieldNameItr = fieldNode.getFieldNames();
while (fieldNameItr.hasNext()) {
final String childName = fieldNameItr.next();
final Iterator<String> fieldNameItr = fieldNode.getFieldNames();
while (fieldNameItr.hasNext()) {
fields.add(new RecordField(fieldNameItr.next(), RecordFieldType.STRING.getDataType()));
代码示例来源:origin: org.apache.avro/avro
} else if (jsonNode.isObject()) {
Map m = new LinkedHashMap();
for (Iterator<String> it = jsonNode.getFieldNames(); it.hasNext(); ) {
String key = it.next();
Schema s = null;
代码示例来源:origin: apache/nifi
final Iterator<String> fieldNames = jsonNode.getFieldNames();
while (fieldNames.hasNext()) {
final String fieldName = fieldNames.next();
代码示例来源:origin: apache/nifi
final Iterator<String> fieldNames = fieldNode.getFieldNames();
while (fieldNames.hasNext()) {
final String childFieldName = fieldNames.next();
final Iterator<String> fieldNames = fieldNode.getFieldNames();
final Map<String, Object> childValues = new HashMap<>();
while (fieldNames.hasNext()) {
代码示例来源:origin: apache/nifi
final Iterator<String> fieldNames = fieldNode.getFieldNames();
final Map<String, Object> childValues = new HashMap<>();
while (fieldNames.hasNext()) {
代码示例来源:origin: org.apache.avro/avro
Field f = new Field(fieldName, fieldSchema,
fieldDoc, defaultValue, order);
Iterator<String> i = field.getFieldNames();
while (i.hasNext()) { // add field props
String prop = i.next();
} else
throw new SchemaParseException("Type not supported: "+type);
Iterator<String> i = schema.getFieldNames();
while (i.hasNext()) { // add properties
String prop = i.next();
代码示例来源:origin: org.apache.avro/avro
e.setItemCount(n.size());
Schema v = s.getValueType();
for (Iterator<String> it = n.getFieldNames(); it.hasNext();) {
e.startItem();
String key = it.next();
代码示例来源:origin: org.apache.avro/avro
out.writeMapStart();
out.setItemCount(node.size());
Iterator<String> i = node.getFieldNames();
while (i.hasNext()) {
out.startItem();
内容来源于网络,如有侵权,请联系作者删除!