Example usage for org.json XML toString

List of usage examples for org.json XML toString

Introduction

In this page you can find the example usage for org.json XML toString.

Prototype

public static String toString(Object object, String tagName) throws JSONException 

Source Link

Document

Convert a JSONObject into a well-formed, element-normal XML string.

Usage

From source file:org.entando.entando.plugins.jptrello.aps.system.services.trello.TrelloConfig.java

public String toXml() throws Throwable {
    JSONObject json = new JSONObject();

    json.put(CONFIG_ORGANIZATION, _organization);
    json.put(CONFIG_KEY, _apiKey);/*  www  . j a v a  2  s. c o  m*/
    json.put(CONFIG_SECRET, _apiSecret);
    json.put(CONFIG_TOKEN, _token);
    return XML.toString(json, CONFIG_ROOT);
}