Examples of writeFieldName()


Examples of com.alibaba.fastjson.serializer.SerializeWriter.writeFieldName()

  }

  public void test_9() throws Exception {
    SerializeWriter out = new SerializeWriter(1);
    out.config(SerializerFeature.UseSingleQuotes, true);
    out.writeFieldName("\na\nb\nc\nd\"'e");
    Assert.assertEquals("'\\na\\nb\\nc\\nd\"\\'e':", out.toString());
  }

  public void test_9_d() throws Exception {
    SerializeWriter out = new SerializeWriter(1);
View Full Code Here

Examples of com.facebook.presto.hive.shaded.org.codehaus.jackson.util.TokenBuffer.writeFieldName()

            }
            // Ok then, let's collect the whole field; name and value
            if (unknown == null) {
                unknown = new TokenBuffer(jp.getCodec());
            }
            unknown.writeFieldName(propName);
            unknown.copyCurrentStructure(jp);
        }

        // We hit END_OBJECT, so:
        Object bean;
View Full Code Here

Examples of com.facebook.presto.jdbc.internal.jackson.databind.util.TokenBuffer.writeFieldName()

            }
            // Ok then, let's collect the whole field; name and value
            if (unknown == null) {
                unknown = new TokenBuffer(jp.getCodec());
            }
            unknown.writeFieldName(propName);
            unknown.copyCurrentStructure(jp);
        }

        // We hit END_OBJECT, so:
        Object bean;
View Full Code Here

Examples of com.fasterxml.jackson.core.JsonGenerator.writeFieldName()

                        json.writeObjectField("values", timer.getSnapshot().getValues());
                    }
                }
                json.writeEndObject();

                json.writeFieldName("rate");
                json.writeStartObject();
                {
                    writeMeteredFields(timer, json);
                }
                json.writeEndObject();
View Full Code Here

Examples of com.fasterxml.jackson.core.JsonGenerator.writeFieldName()

        public void processTimer(MetricName name, Timer timer, Context context) throws Exception {
            final JsonGenerator json = context.json;
            json.writeStartObject();
            {
                json.writeStringField("type", "timer");
                json.writeFieldName("duration");
                json.writeStartObject();
                {
                    json.writeStringField("unit", timer.durationUnit().toString().toLowerCase());
                    writeSummarizable(timer, json);
                    writeSampling(timer, json);
View Full Code Here

Examples of com.fasterxml.jackson.core.JsonGenerator.writeFieldName()

    final JsonGenerator jsonGenerator = jsonFactory.createJsonGenerator(os);

    tree.accept(new MetricTreeVisitor() {
      private void writeKey(MetricTreeBase o) throws JsonGenerationException, IOException {
        if (o.getKey() != null) {
          jsonGenerator.writeFieldName(o.getKey());
        }
      }

      @Override
      public void visit(MetricTreeObject o) {
View Full Code Here

Examples of com.fasterxml.jackson.core.JsonGenerator.writeFieldName()

        try {
            JsonGenerator generator = factory.createJsonGenerator(outputFile, JsonEncoding.UTF8);
            generator.setPrettyPrinter(new DefaultPrettyPrinter());
            try {
                generator.writeStartObject();
                generator.writeFieldName("dependencies");
                writeDependenciesDelta(addedDeps, removedDeps, updatedDeps, generator);
                if (changeLog != null) {
                    generator.writeFieldName("scm");
                    writeChangeLog(generator, changeLog);
                }
View Full Code Here

Examples of com.fasterxml.jackson.core.JsonGenerator.writeFieldName()

            try {
                generator.writeStartObject();
                generator.writeFieldName("dependencies");
                writeDependenciesDelta(addedDeps, removedDeps, updatedDeps, generator);
                if (changeLog != null) {
                    generator.writeFieldName("scm");
                    writeChangeLog(generator, changeLog);
                }
                generator.writeEndObject();
            } finally {
                generator.close();
View Full Code Here

Examples of com.fasterxml.jackson.databind.util.TokenBuffer.writeFieldName()

            }
            // Ok then, let's collect the whole field; name and value
            if (unknown == null) {
                unknown = new TokenBuffer(jp);
            }
            unknown.writeFieldName(propName);
            unknown.copyCurrentStructure(jp);
        }

        // We hit END_OBJECT, so:
        Object bean;
View Full Code Here

Examples of com.fasterxml.jackson.databind.util.TokenBuffer.writeFieldName()

            if (_ignorableProps != null && _ignorableProps.contains(propName)) {
                handleIgnoredProperty(jp, ctxt, bean, propName);
                continue;
            }
            // but... others should be passed to unwrapped property deserializers
            tokens.writeFieldName(propName);
            tokens.copyCurrentStructure(jp);
            // how about any setter? We'll get copies but...
            if (_anySetter != null) {
                try {
                    _anySetter.deserializeAndSet(jp, ctxt, bean, propName);
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.