Package org.codehaus.jackson

Examples of org.codehaus.jackson.JsonParser.skipChildren()


            } else if (fieldName.equals("stopConditions")) {
                if (current == JsonToken.START_OBJECT) {
                    readStopConditions((ObjectNode) jp.readValueAsTree());
                } else {
                    System.out.println("Error: stopConditions property should be an object. Skipping.");
                    jp.skipChildren();
                }
            }
        }
    }
View Full Code Here


                if (fieldName.equals("namespaces")) {
                    if (current == JsonToken.START_OBJECT) {
                        readNamespaces((ObjectNode)jp.readValueAsTree());
                    } else {
                        System.out.println("Error: namespaces property should be an object. Skipping.");
                        jp.skipChildren();
                    }
                } else if (fieldName.equals("fieldTypes")) {
                    if (current == JsonToken.START_ARRAY) {
                        startExecutor();
                        while (jp.nextToken() != JsonToken.END_ARRAY && !abortImport) {
View Full Code Here

                            pushTask(new FieldTypeImportTask(parseFieldType(jp.readValueAsTree())));
                        }
                        waitTasksFinished();
                    } else {
                        System.out.println("Error: fieldTypes property should be an array. Skipping.");
                        jp.skipChildren();
                    }
                } else if (fieldName.equals("recordTypes")) {
                    if (current == JsonToken.START_ARRAY) {
                        Map<QName, FieldType> inlineDeclaredFieldTypes = new HashMap<QName, FieldType>();
                        List<RecordTypeImportTask> rtImportTasks = new ArrayList<RecordTypeImportTask>();
View Full Code Here

                            pushTasks(rtImportTasks);
                            waitTasksFinished();
                        }
                    } else {
                        System.out.println("Error: recordTypes property should be an array. Skipping.");
                        jp.skipChildren();
                    }
                } else if (fieldName.equals("records")) {
                    if (!schemaOnly) {
                        if (current == JsonToken.START_ARRAY) {
                            startExecutor();
View Full Code Here

                                pushTask(new RecordImportTask(jp.readValueAsTree(), lineNr));
                            }
                            waitTasksFinished();
                        } else {
                            System.out.println("Error: records property should be an array. Skipping.");
                            jp.skipChildren();
                        }
                    } else {
                        jp.skipChildren();
                    }
                } else {
View Full Code Here

                        } else {
                            System.out.println("Error: records property should be an array. Skipping.");
                            jp.skipChildren();
                        }
                    } else {
                        jp.skipChildren();
                    }
                } else {
                    System.out.println("Encountered unexpected field: " + fieldName);
                    System.out.println("Maybe you want to use '--format json_lines'?");
                    jp.skipChildren();
View Full Code Here

                        jp.skipChildren();
                    }
                } else {
                    System.out.println("Encountered unexpected field: " + fieldName);
                    System.out.println("Maybe you want to use '--format json_lines'?");
                    jp.skipChildren();
                }
            }
        } finally {
            waitTasksFinished();
        }
View Full Code Here

            parser.nextToken(); // START_OBJECT
            while (parser.nextToken() != null)
            {
                parser.nextToken();
                parser.skipChildren();
                if (parser.getCurrentName() == null) continue;

                keyCountToImport++;
            }
        }
View Full Code Here

  @Override
  public boolean handleUnknownProperty(DeserializationContext ctxt, JsonDeserializer<?> deserializer,
      Object beanOrClass, String propertyName) throws IOException {
    JsonParser jsonParser = ctxt.getParser();
    LOG.warn("Unknown Json property: " + propertyName);
    jsonParser.skipChildren();

    return true;
  }
}
View Full Code Here

            parser.nextToken(); // START_OBJECT
            while (parser.nextToken() != null)
            {
                parser.nextToken();
                parser.skipChildren();
                if (parser.getCurrentName() == null) continue;

                keyCountToImport++;
            }
        }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.