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

'No Json serializer' error by Scala compiler when a serialiser for 'models.Speaker' does exists #15

Open
neomatrix369 opened this issue Oct 26, 2017 · 1 comment

Comments

@neomatrix369
Copy link
Collaborator

neomatrix369 commented Oct 26, 2017

Just raising this issue for documentation and knowledge sharing purposes.

I was changing Speaker.scala to enable some archiving features in it.

See my changes that I initially tried: https://gist.github.com/neomatrix369/5d21d89adf97b99a03d7fc2506496cd6

Running this gives me this strange compilation error:

screen-shot-scala-compiler-error

I noticed the cause of the error were the two functions: checkIfSpeakerHasBeenArchived() and checkIfSpeakerQandAHasBeenArchived() in https://gist.github.com/neomatrix369/5d21d89adf97b99a03d7fc2506496cd6.

It's what the two functions are doing, they are trying to read off Redis and compare values. When I get rid of these functions and clean compile the rest of the code works without any complains.

Would you know what I'm doing wrong? Is the above compilation error is a red-herring (the problem may be somewhere else).

Any advice will be helpful - maybe you could try out my changes and see what happens.

@neomatrix369
Copy link
Collaborator Author

neomatrix369 commented Oct 26, 2017

I did raise it with @nicmarti and @stephanj, @nicmarti advise as follows:

Look at the Json documentation in Play, you need to implement an implicit reader or writer. However there is already one in the Speaker companion object. Import this into the action and it will work

Else look at the rest API, there are samples their


I intend to investigate this further using the above, if anyone else has other hints, its most welcome.

@neomatrix369 neomatrix369 changed the title No Json serializer by Scala when serialiser for models.Speaker does exists 'No Json serializer' error by Scala compiler when a serialiser for 'models.Speaker' does exists Oct 26, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant