Examples of writeFieldName()


Examples of com.linkedin.data.schema.JsonBuilder.writeFieldName()

    JsonBuilder jsonBuilder = new JsonBuilder(JsonBuilder.Pretty.INDENTED);
    SchemaToJsonEncoder encoder = new SchemaToJsonEncoder(jsonBuilder);

    jsonBuilder.writeStartObject();
    jsonBuilder.writeFieldName(Snapshot.MODELS_KEY);
    jsonBuilder.writeStartArray();

    List<NamedDataSchema> models = generateModelList();

    for(DataSchema model : models){
View Full Code Here

Examples of org.codehaus.jackson.JsonGenerator.writeFieldName()

        if (retValue != null) {
          writer.append(JacksonUtil.toJson(retValue));
        } else {
          JsonGenerator g = JacksonUtil.getMapper().getJsonFactory().createJsonGenerator(writer);
          g.writeStartObject();
          g.writeFieldName("__cmds");
          g.writeStartArray();
          List<Object> functions = new ArrayList<Object>(context.getFunctions());
          for (Object function : functions) {
            g.writeObject(function);
          }
View Full Code Here

Examples of org.codehaus.jackson.JsonGenerator.writeFieldName()

  public static void dumpConfiguration(Configuration config,
      Writer out) throws IOException {
    JsonFactory dumpFactory = new JsonFactory();
    JsonGenerator dumpGenerator = dumpFactory.createJsonGenerator(out);
    dumpGenerator.writeStartObject();
    dumpGenerator.writeFieldName("properties");
    dumpGenerator.writeStartArray();
    dumpGenerator.flush();
    synchronized (config) {
      for (Map.Entry<Object,Object> item: config.getProps().entrySet()) {
        dumpGenerator.writeStartObject();
View Full Code Here

Examples of org.codehaus.jackson.JsonGenerator.writeFieldName()

    {
        JsonFactory factory = new JsonFactory();
        StringWriter writer = new StringWriter();
        JsonGenerator generator = factory.createJsonGenerator(writer);
        generator.writeStartObject();
        generator.writeFieldName("bool");
        generator.writeBoolean(true);
        generator.writeFieldName("firstName");
        generator.writeString("john");
        generator.writeFieldName("age");
        generator.writeNumber(1);
View Full Code Here

Examples of org.codehaus.jackson.JsonGenerator.writeFieldName()

        StringWriter writer = new StringWriter();
        JsonGenerator generator = factory.createJsonGenerator(writer);
        generator.writeStartObject();
        generator.writeFieldName("bool");
        generator.writeBoolean(true);
        generator.writeFieldName("firstName");
        generator.writeString("john");
        generator.writeFieldName("age");
        generator.writeNumber(1);
        generator.writeFieldName("gg");
        generator.writeStartObject();
View Full Code Here

Examples of org.codehaus.jackson.JsonGenerator.writeFieldName()

        generator.writeStartObject();
        generator.writeFieldName("bool");
        generator.writeBoolean(true);
        generator.writeFieldName("firstName");
        generator.writeString("john");
        generator.writeFieldName("age");
        generator.writeNumber(1);
        generator.writeFieldName("gg");
        generator.writeStartObject();
        generator.writeFieldName("firstName");
        generator.writeString("john");
View Full Code Here

Examples of org.codehaus.jackson.JsonGenerator.writeFieldName()

        generator.writeBoolean(true);
        generator.writeFieldName("firstName");
        generator.writeString("john");
        generator.writeFieldName("age");
        generator.writeNumber(1);
        generator.writeFieldName("gg");
        generator.writeStartObject();
        generator.writeFieldName("firstName");
        generator.writeString("john");
        generator.writeEndObject();
       
View Full Code Here

Examples of org.codehaus.jackson.JsonGenerator.writeFieldName()

        generator.writeString("john");
        generator.writeFieldName("age");
        generator.writeNumber(1);
        generator.writeFieldName("gg");
        generator.writeStartObject();
        generator.writeFieldName("firstName");
        generator.writeString("john");
        generator.writeEndObject();
       
        generator.writeEndObject();
        generator.close();
View Full Code Here

Examples of org.codehaus.jackson.JsonGenerator.writeFieldName()

  public static void dumpConfiguration(Configuration config,
      Writer out) throws IOException {
    JsonFactory dumpFactory = new JsonFactory();
    JsonGenerator dumpGenerator = dumpFactory.createJsonGenerator(out);
    dumpGenerator.writeStartObject();
    dumpGenerator.writeFieldName("properties");
    dumpGenerator.writeStartArray();
    dumpGenerator.flush();
    synchronized (config) {
      for (Map.Entry<Object,Object> item: config.getProps().entrySet()) {
        dumpGenerator.writeStartObject();
View Full Code Here

Examples of org.codehaus.jackson.JsonGenerator.writeFieldName()

                    JsonGenerator g = f.createJsonGenerator(assumptionFile, JsonEncoding.UTF8);
                    g.useDefaultPrettyPrinter();
                    g.writeStartObject();
                    for (Map.Entry<String, Map<String, Map<String, String>>> ksEntry : assumptions.entrySet())
                    {
                        g.writeFieldName(ksEntry.getKey());
                        g.writeStartArray();
                        for (Map.Entry<String, Map<String, String>> cfEntry : ksEntry.getValue().entrySet())
                        {
                            g.writeStartObject();
                            g.writeFieldName(cfEntry.getKey());
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.