-
Notifications
You must be signed in to change notification settings - Fork 149
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Behavior of zip #487
Comments
related: #516 |
I've hit this too. I think we need an implementation of def newZipWith[B, C](other: JsonDecoder[B])(f: (A, B) => C): JsonDecoder[C] =
new JsonDecoder[C] {
def unsafeDecode(trace: List[JsonError], in: RetractReader): C = {
// Can't actually do this in my code because it's private
// And can't make my own RetractReader because it's a sealed trait
val in2 = new zio.json.internal.WithRecordingReader(in)
val a = self.unsafeDecode(trace, in2)
in2.rewind()
val b = other.unsafeDecode(trace, in2)
f(a, b)
}
} |
Fixed by #1260 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
After using Circe, I expected
zip
to behave likeproduct
:However, the implementation expects an array. This makes sense as a default, but how can I define the behavior above?
The text was updated successfully, but these errors were encountered: