optMap

fun optMap(jsonObject: JSONObject, @Size(min = 1) fieldName: String): Map<String, Any?>?

Calls through to JSONObject.optJSONObject and then uses jsonObjectToMap on the result.

Return

the value stored in the requested field, or null if the key is not present

Parameters

jsonObject

the input object

fieldName

the required field name