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

Add jsonReader and jsonWriter functions for constructing readers and writers for case classes #246

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

psliwa
Copy link

@psliwa psliwa commented Jan 11, 2018

Hi,

There are functions like jsonFormat3 that create JsonFormat objects for case classes. Sometimes you need only readers or writers, because you are developing client or server side of an api. There is no problem, JsonFormat extends both. But there are situations when you have your type with custom serialisation logic, eg. serialising sealed trait, and you are developing eg. only api server side. So in such situations it would be good to define only writers for your's case classes in order to avoid defining unnecessary read function for your exemplary sealed trait. This PR provides such functions, analogous to jsonFormat familly.

This PR doesn't provide any new tests, because jsonFormat functions have been refactored and they use new functions internally, so ProductFormatsSpec tests new functions as well.

@janjaali
Copy link

Is there any possibility that this PR will be processed any further?

@jrudolph
Copy link
Member

Is there any possibility that this PR will be processed any further?

I think it is looking quite nice. I'm trying to prepare a release in the upcoming months but it might still be some time as I have very little time to make progress.

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

Successfully merging this pull request may close these issues.

3 participants