optHash

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

Calls through to JSONObject.optJSONObject and then uses jsonObjectToStringMap 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