@Override public void copyCurrentStructure(JsonParser p) throws IOException { if (delegateCopyMethods) delegate.copyCurrentStructure(p); else super.copyCurrentStructure(p); }
@Override public void copyCurrentStructure(JsonParser p) throws IOException { if (delegateCopyMethods) delegate.copyCurrentStructure(p); else super.copyCurrentStructure(p); }
writeStartObject(); while (p.nextToken() != JsonToken.END_OBJECT) { copyCurrentStructure(p); writeStartArray(); while (p.nextToken() != JsonToken.END_ARRAY) { copyCurrentStructure(p);
String name = parser.getValueAsString(); if (!"nextUri".equals(name) && !"partialCancelUri".equals(name)) { generator.copyCurrentStructure(parser); continue;
writeStartObject(); while (p.nextToken() != JsonToken.END_OBJECT) { copyCurrentStructure(p); writeStartArray(); while (p.nextToken() != JsonToken.END_ARRAY) { copyCurrentStructure(p);
@Override public Slice extract(JsonParser jsonParser) throws IOException { if (!jsonParser.hasCurrentToken()) { throw new JsonParseException(jsonParser, "Unexpected end of value"); } DynamicSliceOutput dynamicSliceOutput = new DynamicSliceOutput(ESTIMATED_JSON_OUTPUT_SIZE); try (JsonGenerator jsonGenerator = createJsonGenerator(JSON_FACTORY, dynamicSliceOutput)) { jsonGenerator.copyCurrentStructure(jsonParser); } return dynamicSliceOutput.slice(); } }
@Override public void copyCurrentStructure(JsonParser p) throws IOException { if (delegateCopyMethods) delegate.copyCurrentStructure(p); else super.copyCurrentStructure(p); }
@Override public void copyCurrentStructure(JsonParser jp) throws IOException { if (delegateCopyMethods) delegate.copyCurrentStructure(jp); else super.copyCurrentStructure(jp); }
@Override public void copyCurrentStructure(JsonParser jp) throws IOException { if (delegateCopyMethods) delegate.copyCurrentStructure(jp); else super.copyCurrentStructure(jp); }
@Override public void copyCurrentStructure(JsonParser jp) throws IOException { if (delegateCopyMethods) delegate.copyCurrentStructure(jp); else super.copyCurrentStructure(jp); }
@Override public void copyCurrentStructure(JsonParser jp) throws IOException, JsonProcessingException { delegate.copyCurrentStructure(jp); }
@Override public void copyCurrentStructure(JsonParser jp) throws IOException, JsonProcessingException { delegate.copyCurrentStructure(jp); }
public AceRecord next() { try { JsonGenerator g = JsonFactoryImpl.INSTANCE.getGenerator(new ByteArrayOutputStream()); g.copyCurrentStructure(p); g.flush(); byte[] out = ((ByteArrayOutputStream)g.getOutputTarget()).toByteArray(); g.close(); return new AceRecord(out); } catch (IOException ex) { throw new RuntimeException(ex); } }
@Override public void copyCurrentStructure(XContentParser parser) throws IOException { // the start of the parser if (parser.currentToken() == null) { parser.nextToken(); } if (parser instanceof JsonXContentParser) { generator.copyCurrentStructure(((JsonXContentParser) parser).parser); } else { XContentHelper.copyCurrentStructure(this, parser); } }
@Override public void copyCurrentStructure(XContentParser parser) throws IOException { // the start of the parser if (parser.currentToken() == null) { parser.nextToken(); } if (parser instanceof JsonXContentParser) { generator.copyCurrentStructure(((JsonXContentParser) parser).parser); } else { XContentHelper.copyCurrentStructure(this, parser); } }
@Override public void copyCurrentStructure(XContentParser parser) throws IOException { // the start of the parser if (parser.currentToken() == null) { parser.nextToken(); } if (parser instanceof JsonXContentParser) { generator.copyCurrentStructure(((JsonXContentParser) parser).parser); } else { copyCurrentStructure(this, parser); } }
@Override public Slice extract(JsonParser jsonParser) throws IOException { if (!jsonParser.hasCurrentToken()) { throw new JsonParseException("Unexpected end of value", jsonParser.getCurrentLocation()); } DynamicSliceOutput dynamicSliceOutput = new DynamicSliceOutput(ESTIMATED_JSON_OUTPUT_SIZE); try (JsonGenerator jsonGenerator = JSON_FACTORY.createGenerator(dynamicSliceOutput)) { jsonGenerator.copyCurrentStructure(jsonParser); } return dynamicSliceOutput.slice(); } }
@Override public Slice extract(JsonParser jsonParser) throws IOException { if (!jsonParser.hasCurrentToken()) { throw new JsonParseException(jsonParser, "Unexpected end of value"); } DynamicSliceOutput dynamicSliceOutput = new DynamicSliceOutput(ESTIMATED_JSON_OUTPUT_SIZE); try (JsonGenerator jsonGenerator = createJsonGenerator(JSON_FACTORY, dynamicSliceOutput)) { jsonGenerator.copyCurrentStructure(jsonParser); } return dynamicSliceOutput.slice(); } }
@Override public Slice extract(JsonParser jsonParser) throws IOException { if (!jsonParser.hasCurrentToken()) { throw new JsonParseException(jsonParser, "Unexpected end of value"); } DynamicSliceOutput dynamicSliceOutput = new DynamicSliceOutput(ESTIMATED_JSON_OUTPUT_SIZE); try (JsonGenerator jsonGenerator = createJsonGenerator(JSON_FACTORY, dynamicSliceOutput)) { jsonGenerator.copyCurrentStructure(jsonParser); } return dynamicSliceOutput.slice(); } }
@Override public Slice extract(JsonParser jsonParser) throws IOException { if (!jsonParser.hasCurrentToken()) { throw new JsonParseException("Unexpected end of value", jsonParser.getCurrentLocation()); } DynamicSliceOutput dynamicSliceOutput = new DynamicSliceOutput(ESTIMATED_JSON_OUTPUT_SIZE); try (JsonGenerator jsonGenerator = createJsonGenerator(JSON_FACTORY, dynamicSliceOutput)) { jsonGenerator.copyCurrentStructure(jsonParser); } return dynamicSliceOutput.slice(); } }