toString

open fun toString(object: Any): String

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

Return

A string.

Parameters

object

A JSONObject.

Throws

Thrown if there is an error parsing the string


open fun toString(object: Any, tagName: String): String

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

Return

A string.

Parameters

object

A JSONObject.

tagName

The optional name of the enclosing tag.

Throws

Thrown if there is an error parsing the string


open fun toString(object: Any, tagName: String, config: XMLParserConfiguration): String

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

Return

A string.

Parameters

object

A JSONObject.

tagName

The optional name of the enclosing tag.

config

Configuration that can control output to XML.

Throws

Thrown if there is an error parsing the string


open fun toString(object: Any, indentFactor: Int): String

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

Return

A string.

Parameters

object

A JSONObject.

indentFactor

The number of spaces to add to each level of indentation.

Throws

Thrown if there is an error parsing the string


open fun toString(object: Any, tagName: String, indentFactor: Int): String

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

Return

A string.

Parameters

object

A JSONObject.

tagName

The optional name of the enclosing tag.

indentFactor

The number of spaces to add to each level of indentation.

Throws

Thrown if there is an error parsing the string


open fun toString(object: Any, tagName: String, config: XMLParserConfiguration, indentFactor: Int): String

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

Return

A string.

Parameters

object

A JSONObject.

tagName

The optional name of the enclosing tag.

config

Configuration that can control output to XML.

indentFactor

The number of spaces to add to each level of indentation.

Throws

Thrown if there is an error parsing the string