All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.json4s.jackson.JValueDeserializerResolver.scala Maven / Gradle / Ivy

There is a newer version: 3.2.5
Show newest version
package org.json4s
package jackson

import com.fasterxml.jackson.databind.deser.Deserializers
import org.json4s._
import com.fasterxml.jackson.databind.{BeanDescription, DeserializationConfig, JavaType}

private object JValueDeserializerResolver extends Deserializers.Base {
  private val JVALUE = classOf[JValue]

  override def findBeanDeserializer(javaType: JavaType, config: DeserializationConfig, beanDesc: BeanDescription) = {
    if (!JVALUE.isAssignableFrom(javaType.getRawClass)) null
    else new JValueDeserializer(config.getTypeFactory(), javaType.getRawClass)
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy