You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
JsonObject and especially JsonArray would be good candidates to enrich with monad (map, flatMap, filter) and higer-order functions (forall, etc.). As they are Java types at the moment, it needs some nasty conversions into equivalent Scala collections to get there.
Looping over a JsonArray looks like this at the moment:
valitems:JsonArray= someFunction()
for (index <-0 until items.size()) yield items.get[JsonObject](index).get("someKey")
JsonObject and especially JsonArray would be good candidates to enrich with monad (map, flatMap, filter) and higer-order functions (forall, etc.). As they are Java types at the moment, it needs some nasty conversions into equivalent Scala collections to get there.
Looping over a JsonArray looks like this at the moment:
But what i would love to see for JsonArray is:
The same makes sense for JsonObject, even though JsonArray is the more natural candidate here.
The text was updated successfully, but these errors were encountered: