utils / com.revenuecat.purchases.utils / org.json.JSONObject

Extensions for org.json.JSONObject

getDate

fun JSONObject.getDate(jsonKey: String): Date

getNullableString

fun JSONObject.getNullableString(name: String): String?

optDate

fun JSONObject.optDate(jsonKey: String): Date?

optNullableString

fun JSONObject.optNullableString(name: String): String?

parseDates

Parses dates that match a JSON key in a JSONObject

fun JSONObject.parseDates(jsonKey: String): HashMap<String, Date?>

parseExpirations

Parses expiration dates in a JSONObject

fun JSONObject.parseExpirations(): Map<String, Date?>

parsePurchaseDates

Parses purchase dates in a JSONObject

fun JSONObject.parsePurchaseDates(): Map<String, Date?>