1

I'm working on a multiplatform game (desktop and Android) and I'm currently working on serialization. I use lift-json. It works great on desktop but on Android it's a nightmare:

By exemple, if I write

case class A(int:Int)

implicit val formats = Serialization.formats(ShortTypeHints(List(classOf[A])))

println(write(A(1)))

On desktop I would have:

{jsonClass: "A",int:1} 

and on Android:

{jsonClass : "A"} 

(I cannot deserialize this since it lacks it members). The reason I suspect is proguard 4.8 that the android version use.

Atol
  • 569
  • 4
  • 12

1 Answers1

1

One thing that proguard does is change class and member names. If you are using anything that uses Java Reflection, then proguard might mess it up.

If this is the case, you would have to tell Proguard to not obfuscate the classes that are needed to store your JSON data

Joe Plante
  • 6,308
  • 2
  • 30
  • 23