1

I'm a bit amazed that I can't find any other information on this.

As I understand it json4s is the same thing as lift-json, just decoupled from lift. Cool, great. I have a library I'm using, with a class I can't modify, that can produce a lift-json JObject. I want to convert that to a json4s JObject.

A straight cast doesn't work, which makes sense.

Is there a simple way to do this? Preferably faster than dumping it to a string and then reading it in again as the right type?

Sushisource
  • 611
  • 6
  • 17
  • can you provide your code? Json4s uses lift-json : https://github.com/json4s/json4s/blob/523b82342fd6320adeae0d32ca83d259d218323e/README.md – Ashalynd May 25 '16 at 01:13
  • Right - but all the same classes are under a different package, and even though I have two "JObjects" the compiler doesn't think they're the same (rightfully so). This isn't my actual code, but it would be equivalent: def returnsJson4s: json4s.JObject = someLibFunctionThatReturnsALiftJOBject() Then the compiler complains that a JObject isn't a JObject, which is true in the strict sense – Sushisource May 25 '16 at 16:18

0 Answers0