question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Integration with Json4s

See original GitHub issue

Would it be possible to have an integration with Json4s? Serializing an enum is trivial:

import enumeratum.EnumEntry
import org.json4s.CustomSerializer

object EnumSerializer extends CustomSerializer[EnumEntry](format => (
    PartialFunction.empty,
    {
      case x: EnumEntry => JString(x.entryName)
    }
  ))

But deserializing is not so easy, the tricky part is to instantiate the correct enum type.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
mikaelstaldalcommented, Mar 6, 2017
0reactions
mikaelstaldalcommented, Feb 27, 2017

It works, thanks!

I had a look at Circe, and it looks promising. But we have a quite large code base which depends heavily on Json4s, so it will be quite some work to migrate, and we will probably wait for Circe to be a bit more mature.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Json4s by json4s
The Home page od Json4s website. ... Be aware that the default behavior of the jackson integration is to close the stream when...
Read more >
JSON4S error at extract[T] - Stack Overflow
i am using json4s to extract data according to case class but i am getting a "unknown error". My scala version is 2.10.2...
Read more >
JSON handling - http4s
http4s-core does not include JSON support, but integration with three popular ... Json4s is less functionally pure than Circe or Argonaut, but older...
Read more >
Challenges Faced while integrating Apache Spark with HBase ...
py4j.protocol.Py4JJavaError: An error occurred while calling o64.save. : java.lang.NoSuchMethodError: org.json4s.jackson.JsonMethods. For this ...
Read more >
Spray: how to (de)serialize objects with json4s
A while ago I wrote an article on how to build a REST api with Spray, where I used the Spray facilities to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found