This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

fix EitherDeserializer

  • Loading branch information...
imikushin committed May 13, 2012
1 parent 40cb03d commit 1ea9c3b6dc078a872abbd83288b87924ea6aa4fc
Showing with 2 additions and 3 deletions.
  1. +2 −3 src/main/scala/com/codahale/jerkson/deser/EitherDeserializer.scala
@@ -1,14 +1,13 @@
package com.codahale.jerkson.deser
import com.fasterxml.jackson.core.JsonParser
-import com.fasterxml.jackson.databind.JavaType
-import com.fasterxml.jackson.databind.{DeserializationConfig, DeserializationContext, JsonDeserializer}
import com.fasterxml.jackson.databind.node.TreeTraversingParser
+import com.fasterxml.jackson.databind._
class EitherDeserializer(config: DeserializationConfig,
javaType: JavaType) extends JsonDeserializer[Object] {
def deserialize(jp: JsonParser, ctxt: DeserializationContext) = {
- val node = jp.readValueAsTree
+ val node = jp.readValueAsTree[JsonNode]
val tp = new TreeTraversingParser(node, jp.getCodec)
try {

0 comments on commit 1ea9c3b

Please sign in to comment.