Examples of createJsonParser()


Examples of com.fasterxml.jackson.core.JsonFactory.createJsonParser()

  final JsonParser jsonParser;

  JsonMetricDataStream(InputStream is) throws IOException {
    JsonFactory jsonFactory = new JsonFactory();
    this.jsonParser = jsonFactory.createJsonParser(is);
  }

  @Override
  public void close() throws IOException {
    jsonParser.close();
View Full Code Here

Examples of com.fasterxml.jackson.core.JsonFactory.createJsonParser()

    diffSchema = new DiffSchema();
    removedFields = Lists.newArrayList();

    try {
      JsonFactory factory = new JsonFactory();
      parser = factory.createJsonParser(fileSystem.open(hadoopPath));
      parser.nextToken(); // Read to the first START_OBJECT token
      generator = new SchemaIdGenerator();
    } catch (IOException e) {
      throw new ExecutionSetupException(e);
    }
View Full Code Here

Examples of com.fasterxml.jackson.databind.MappingJsonFactory.createJsonParser()

        MappingJsonFactory f = new MappingJsonFactory();
        JsonParser jp;
        LBMember member = new LBMember();
       
        try {
            jp = f.createJsonParser(json);
        } catch (JsonParseException e) {
            throw new IOException(e);
        }
       
        jp.nextToken();
View Full Code Here

Examples of com.google.api.client.json.JsonFactory.createJsonParser()

        storeClientToken(jsonFactory);
        LOGGER.log(Level.INFO, "client token stored in '" + this.clientTokenPath + "'");
      } else {

        clientToken = jsonFactory.createJsonParser(clientTokenAsJson).parse(GoogleTokenResponse.class);
      }

      credential.setFromTokenResponse(clientToken);

    } catch (final IOException e) {
View Full Code Here

Examples of com.google.api.client.json.jackson2.JacksonFactory.createJsonParser()

        storeClientToken(jsonFactory);
        LOGGER.log(Level.INFO, "client token stored in '" + this.clientTokenPath + "'");
      } else {

        clientToken = jsonFactory.createJsonParser(clientTokenAsJson).parse(GoogleTokenResponse.class);
      }

      credential.setFromTokenResponse(clientToken);

    } catch (final IOException e) {
View Full Code Here

Examples of org.codehaus.jackson.JsonFactory.createJsonParser()

      throws IOException {
 
      this.depth = depth;
      byte[] in = input.getBytes("UTF-8");
      JsonFactory f = new JsonFactory();
      JsonParser p = f.createJsonParser(
          new ByteArrayInputStream(input.getBytes("UTF-8")));
     
      ByteArrayOutputStream os = new ByteArrayOutputStream();
      Encoder cos = new BlockingBinaryEncoder(os, bufferSize);
      serialize(cos, p, os);
View Full Code Here

Examples of org.codehaus.jackson.JsonFactory.createJsonParser()

      cos.flush();
     
      byte[] bb = os.toByteArray();
      // dump(bb);
      this.input = DecoderFactory.defaultFactory().createBinaryDecoder(bb, null);
      this.parser =  f.createJsonParser(new ByteArrayInputStream(in));
    }
   
    public void scan() throws IOException {
      Stack<S> countStack = new Stack<S>();
      long count = 0;
View Full Code Here

Examples of org.codehaus.jackson.JsonFactory.createJsonParser()

        generator.writeEndObject();
        generator.close();
        String generated = writer.toString();
        System.out.print(generated);
       
        JsonParser parser = factory.createJsonParser(generated);
        assertTrue(parser.nextToken()==JsonToken.START_OBJECT);
        parser.nextToken();
       
        assertEquals("bool", parser.getCurrentName());
        assertTrue(parser.nextToken()==JsonToken.VALUE_TRUE);
View Full Code Here

Examples of org.codehaus.jackson.JsonFactory.createJsonParser()

    ZNRecord record = null;

    try
    {
      JsonFactory f = new JsonFactory();
      JsonParser jp = f.createJsonParser(bais);

      jp.nextToken(); // will return JsonToken.START_OBJECT (verify?)
      while (jp.nextToken() != JsonToken.END_OBJECT)
      {
        String fieldname = jp.getCurrentName();
View Full Code Here

Examples of org.codehaus.jackson.JsonFactory.createJsonParser()

            if (assumptionFile.isFile())
            {
                try
                {
                    JsonFactory f = new JsonFactory();
                    JsonParser p = f.createJsonParser(assumptionFile);
                    JsonToken token = p.nextToken();
                    while (token != JsonToken.END_OBJECT)
                    {
                        if (token == JsonToken.FIELD_NAME)
                        {
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.