Java Json jsonObjectToBuilder(JsonObject jo)

Here you can find the source of jsonObjectToBuilder(JsonObject jo)

Description

json Object To Builder

License

Open Source License

Declaration

public static JsonObjectBuilder jsonObjectToBuilder(JsonObject jo) 

Method Source Code


//package com.java2s;
//License from project: Open Source License 

import java.util.Map.Entry;
import javax.json.Json;
import javax.json.JsonObject;
import javax.json.JsonObjectBuilder;
import javax.json.JsonValue;

public class Main {
    public static JsonObjectBuilder jsonObjectToBuilder(JsonObject jo) {
        JsonObjectBuilder job = Json.createObjectBuilder();

        for (Entry<String, JsonValue> entry : jo.entrySet()) {
            job.add(entry.getKey(), entry.getValue());
        }//w  w w  . j av  a2s .  c o m

        return job;
    }
}

Related

  1. getJSONDate(long l)
  2. getJsonMapper()
  3. hasKey(JsonObject object, String name)
  4. jsonEquals(JsonArray expected, JsonArray actual, boolean strict)
  5. jsonObject(String key, JsonValue val)
  6. jsonPrettyPrinter(Object object)
  7. jsonString(JsonValue value)
  8. jsonValueToJsonString(final JsonValue jsonValue, final String key)
  9. listToJsonArray(List list)