Hey, I am on my phone right now so I will send you a gist later, but you just want something like `implicitly[DecodeJson[String]].flatMap(s => StartsWithFoo(s).cata(DecodeResult.ok, DecodeResult.fail("Didn't start with foo."))`
There should probably be an easier way, but the above is probably the most workable at the moment.
Cheers
Mark
--
You received this message because you are subscribed to the Google Groups "argonaut-json" group.
To unsubscribe from this group and stop receiving emails from it, send an email to argonaut-jso...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Actually it is provably even easier if you avoid the indirection, see https://github.com/argonaut-io/argonaut/blob/master/src/main/scala/argonaut/DecodeJson.scala#L205 this means you are messing around with the hcusor but it is really just a .string.flatMap(StartsWithFoo) so hopefully not too bad.
--