forked from gkossakowski/build-play20
-
Notifications
You must be signed in to change notification settings - Fork 0
/
jerkson.diff
89 lines (82 loc) · 3.87 KB
/
jerkson.diff
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
diff --git a/build.sbt b/build.sbt
new file mode 100644
index 0000000..6c3576d
--- /dev/null
+++ b/build.sbt
@@ -0,0 +1,20 @@
+name := "jerkson"
+
+organization := "com.codahale"
+
+version := "0.5.0"
+
+scalaVersion := "2.10.0-virtualized-SNAPSHOT"
+
+resolvers += "Local Maven Repository" at Path.userHome.asURL + "/.m2/repository"
+
+resolvers += ScalaToolsReleases
+
+resolvers += "repo.codahale.com" at "http://repo.codahale.com"
+
+libraryDependencies ++= Seq(
+ "org.codehaus.jackson" % "jackson-core-asl" % "1.9.3",
+ "org.codehaus.jackson" % "jackson-mapper-asl" % "1.9.3"
+)
+
+libraryDependencies <+= scalaVersion("org.scala-lang" % "scala-compiler" % _)
diff --git a/project/build.properties b/project/build.properties
new file mode 100644
index 0000000..f4ff7a5
--- /dev/null
+++ b/project/build.properties
@@ -0,0 +1,1 @@
+sbt.version=0.11.3
diff --git a/src/main/scala/com/codahale/jerkson/ser/IterableSerializer.scala b/src/main/scala/com/codahale/jerkson/ser/IterableSerializer.scala
index 20cb779..821d445 100644
--- a/src/main/scala/com/codahale/jerkson/ser/IterableSerializer.scala
+++ b/src/main/scala/com/codahale/jerkson/ser/IterableSerializer.scala
@@ -6,7 +6,7 @@ import org.codehaus.jackson.map.annotate.JsonCachable
@JsonCachable
class IterableSerializer extends JsonSerializer[Iterable[_]] {
- def serialize(value: Iterable[_], json: JsonGenerator, provider: SerializerProvider) {
+ def serialize(value: Iterable[Any], json: JsonGenerator, provider: SerializerProvider) {
json.writeStartArray()
for (element <- value) {
provider.defaultSerializeValue(element, json)
diff --git a/src/main/scala/com/codahale/jerkson/ser/MapSerializer.scala b/src/main/scala/com/codahale/jerkson/ser/MapSerializer.scala
index 7d75a99..b214c6a 100644
--- a/src/main/scala/com/codahale/jerkson/ser/MapSerializer.scala
+++ b/src/main/scala/com/codahale/jerkson/ser/MapSerializer.scala
@@ -5,8 +5,8 @@ import org.codehaus.jackson.map.{SerializerProvider, JsonSerializer}
import org.codehaus.jackson.map.annotate.JsonCachable
@JsonCachable
-class MapSerializer extends JsonSerializer[collection.Map[_ ,_]] {
- def serialize(map: collection.Map[_,_], json: JsonGenerator, provider: SerializerProvider) {
+class MapSerializer extends JsonSerializer[collection.Map[Any, Any]] {
+ def serialize(map: collection.Map[Any,Any], json: JsonGenerator, provider: SerializerProvider) {
json.writeStartObject()
for ((key, value) <- map) {
provider.defaultSerializeField(key.toString, value, json)
diff --git a/src/main/scala/com/codahale/jerkson/util/CaseClassSigParser.scala b/src/main/scala/com/codahale/jerkson/util/CaseClassSigParser.scala
index 3895ea8..841473b 100644
--- a/src/main/scala/com/codahale/jerkson/util/CaseClassSigParser.scala
+++ b/src/main/scala/com/codahale/jerkson/util/CaseClassSigParser.scala
@@ -4,7 +4,8 @@ import com.codahale.jerkson.util.scalax.rules.scalasig._
import org.codehaus.jackson.`type`.JavaType
import org.codehaus.jackson.map.`type`.TypeFactory
import scala.reflect.ScalaSignature
-import scala.reflect.generic.ByteCodecs
+//import scala.reflect.generic.ByteCodecs
+import scala.reflect.internal.pickling.ByteCodecs
class MissingPickledSig(clazz: Class[_]) extends Error("Failed to parse pickled Scala signature from: %s".format(clazz))
diff --git a/src/main/scala/com/codahale/jerkson/util/scalax/rules/scalasig/ScalaSig.scala b/src/main/scala/com/codahale/jerkson/util/scalax/rules/scalasig/ScalaSig.scala
index 0e12b42..1e75768 100644
--- a/src/main/scala/com/codahale/jerkson/util/scalax/rules/scalasig/ScalaSig.scala
+++ b/src/main/scala/com/codahale/jerkson/util/scalax/rules/scalasig/ScalaSig.scala
@@ -4,7 +4,8 @@ package rules
package scalasig
import ClassFileParser.{ConstValueIndex, Annotation}
-import scala.reflect.generic.ByteCodecs
+//import scala.reflect.generic.ByteCodecs
+import scala.reflect.internal.pickling.ByteCodecs
object ScalaSigParser {