Emil Kantis
01/10/2025, 7:33 PMmyListOfJsonStuff.filter {
runCatching {
it shouldEqualSpecifiedJson """ { "type": "FOO" } """
}.isSuccess
}
Anyone else done something similar? Or maybe figured some way to do this neatly with existing functionality?sam
01/10/2025, 9:58 PMEmil Kantis
01/10/2025, 10:00 PMfilterMatching(t: (T) -> Unit)
, or perhaps filterMatching(matcher: Matcher<T>)
sam
01/10/2025, 10:01 PMEmil Kantis
01/10/2025, 10:57 PMKlitos Kyriacou
01/13/2025, 11:21 AMfilterMatching(matcher: Matcher<T>)
which doesn't involve exceptions? On the other hand, users can already easily use the stdlib's filter
for that.