extractAndProcess

fun extractAndProcess(obj: JSONObject, then: (Type?, Throwable?) -> Unit)

Extract the Type from the provided JSONObject and pass it to the provided lambda.

Parameters

obj

The JSONObject to extract the Type from.

then

The lambda that accepts two nullable types: 1. The extracted Type and

  1. a Throwable in the event the Type extraction fails.