jsonObject

fun jsonObject(reader: Reader, objectAction: JSONObject.() -> Unit = {}): JSONObject

Answer a JSONObject that has had the provided objectAction applied to it.

Return

A JSONObject.

Parameters

reader

The Reader that contains the JSON content.

objectAction

A lambda that accepts the created and returned JSONObject.


fun jsonObject(raw: String, objectAction: JSONObject.() -> Unit = {}): JSONObject

Answer a JSONObject that has had the provided objectAction applied to it.

Return

A JSONObject.

Parameters

raw

The raw JSON as a string.

objectAction

A lambda that accepts the created and returned JSONObject.