``` Observable.just(lastUpdated) ...
# thailand
b
Copy code
Observable.just(lastUpdated)
                    .flatMap {
                           “api_path".httpGet(params).rx_object(Order.JsonDeserializer())
                    }.onErrorReturn { Pair(Arrays.asList<Order>(), 0) }
                    .doOnError {
                    }
                    .subscribe {
                    }.addTo(subscriptions)
Order.kt
Copy code
class JsonDeserializer : ResponseDeserializable<Pair<List<Order>,Int>> {
        override fun deserialize(content: String): Pair<List<Order>, Int> {
            return OrderJsonReader.readJsonArray(content)
        }
    }