private fun JSONObject.getLongOrNull(name: String): Long?{
return this.getOrNull(name){ this.getLong(name) }
}
private fun JSONObject.getIntOrNull(name: String): Int?{
return this.getOrNull(name){ this.getInt(name) }
}
private inline fun<T: Any> JSONObject.getOrNull(name: String, block: () -> T): T?{
return if(this.has(name)) block.invoke() else null
}