Skip to content
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

Encoding case classes containing streams #207

Open
soujiro32167 opened this issue Feb 8, 2021 · 0 comments
Open

Encoding case classes containing streams #207

soujiro32167 opened this issue Feb 8, 2021 · 0 comments

Comments

@soujiro32167
Copy link

soujiro32167 commented Feb 8, 2021

I've had a use case like this: I want to return a case class Paginated[A](total: Long, results: List[A]). However, the list can get very big. What I really wanted was case class Paginated[F[_], A](total: Long, results: Stream[F, A]).
How would we encode such a case class using Circe? I have a solution using Shapeless, pretty much the same thing circe does but with streams. Would it be useful here?

soujiro32167 added a commit to soujiro32167/circe-fs2 that referenced this issue Feb 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant