spray / spray-json

A lightweight, clean and simple JSON implementation in Scala
Apache License 2.0
974 stars 190 forks source link

Make JsonFormats serializable #195

Closed ghost closed 2 years ago

ghost commented 8 years ago

Support java serialization so that spray-json can be used in frameworks that make heavy use of serialization. Apache Spark for example.

Fixes #191

ghost commented 8 years ago

Not sure why my change would cause the following build error:

[error] Modules were resolved with conflicting cross-version suffixes in {file:/home/travis/build/spray/spray-json/}spray-json:
[error]    org.scalacheck:scalacheck _2.12.0-M4, _2.12.0-M5
java.lang.RuntimeException: Conflicting cross-version suffixes in: org.scalacheck:scalacheck
    at scala.sys.package$.error(package.scala:27)
    at sbt.ConflictWarning$.processCrossVersioned(ConflictWarning.scala:46)
    at sbt.ConflictWarning$.apply(ConflictWarning.scala:32)
    at sbt.Classpaths$$anonfun$69.apply(Defaults.scala:1179)
    at sbt.Classpaths$$anonfun$69.apply(Defaults.scala:1176)
    at scala.Function1$$anonfun$compose$1.apply(Function1.scala:47)
    at sbt.$tilde$greater$$anonfun$$u2219$1.apply(TypeFunctions.scala:40)
    at sbt.std.Transform$$anon$4.work(System.scala:63)
    at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:226)
    at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:226)
    at sbt.ErrorHandling$.wideConvert(ErrorHandling.scala:17)
    at sbt.Execute.work(Execute.scala:235)
    at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:226)
    at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:226)
    at sbt.ConcurrentRestrictions$$anon$4$$anonfun$1.apply(ConcurrentRestrictions.scala:159)
    at sbt.CompletionService$$anon$2.call(CompletionService.scala:28)
    at java.util.concurrent.FutureTask.run(FutureTask.java:262)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
    at java.util.concurrent.FutureTask.run(FutureTask.java:262)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:745)
[error] (*:update) Conflicting cross-version suffixes in: org.scalacheck:scalacheck
[error] Total time: 28 s, completed Aug 18, 2016 12:45:03 AM
graffam commented 7 years ago

not sure what is causing this issue either, just pulled your code down and checked it out, tests are passing over here. Thanks for taking the initiative, been trying to find a JSON library that plays with spark nicely.