c49a898cb851f8fef7d7a6a9501c66b8f03ae05cPhill Cunnington * The contents of this file are subject to the terms of the Common Development and
c49a898cb851f8fef7d7a6a9501c66b8f03ae05cPhill Cunnington * Distribution License (the License). You may not use this file except in compliance with the
c49a898cb851f8fef7d7a6a9501c66b8f03ae05cPhill Cunnington * You can obtain a copy of the License at legal/CDDLv1.0.txt. See the License for the
c49a898cb851f8fef7d7a6a9501c66b8f03ae05cPhill Cunnington * specific language governing permission and limitations under the License.
c49a898cb851f8fef7d7a6a9501c66b8f03ae05cPhill Cunnington * When distributing Covered Software, include this CDDL Header Notice in each file and include
c49a898cb851f8fef7d7a6a9501c66b8f03ae05cPhill Cunnington * the License file at legal/CDDLv1.0.txt. If applicable, add the following below the CDDL
c49a898cb851f8fef7d7a6a9501c66b8f03ae05cPhill Cunnington * Header, with the fields enclosed by brackets [] replaced by your own identifying
c49a898cb851f8fef7d7a6a9501c66b8f03ae05cPhill Cunnington * information: "Portions copyright [year] [name of copyright owner]".
c49a898cb851f8fef7d7a6a9501c66b8f03ae05cPhill Cunnington * Copyright 2013-2015 ForgeRock AS.
91a599b60b62e70c63f6f698aaac20b41ba12941Phill Cunnington * A Builder class for creating JsonValues for json objects.
91a599b60b62e70c63f6f698aaac20b41ba12941Phill Cunnington private final Map<String, Object> content = new LinkedHashMap<String, Object>();
91a599b60b62e70c63f6f698aaac20b41ba12941Phill Cunnington * Adds a key value pair to the json object.
91a599b60b62e70c63f6f698aaac20b41ba12941Phill Cunnington * @param key The key.
91a599b60b62e70c63f6f698aaac20b41ba12941Phill Cunnington * @param value The value.
91a599b60b62e70c63f6f698aaac20b41ba12941Phill Cunnington * @return The json object builder.
91a599b60b62e70c63f6f698aaac20b41ba12941Phill Cunnington public JsonObject put(String key, Object value) {
91a599b60b62e70c63f6f698aaac20b41ba12941Phill Cunnington * Creates a builder for creating json arrays.
91a599b60b62e70c63f6f698aaac20b41ba12941Phill Cunnington * @param key The key the json array will be inserted with into the json object.
91a599b60b62e70c63f6f698aaac20b41ba12941Phill Cunnington * @return The json array builder.
91a599b60b62e70c63f6f698aaac20b41ba12941Phill Cunnington * Takes the json object map and creates a JsonValue from it.
91a599b60b62e70c63f6f698aaac20b41ba12941Phill Cunnington * @return A JsonValue.