This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From 5ec37ea1d859430b950cf49c8bba5bf8499522cc Mon Sep 17 00:00:00 2001 | |
From: Jesse C <[email protected]> | |
Date: Mon, 13 Aug 2012 14:36:51 -0400 | |
Subject: [PATCH] Hacky proof-of-concept for keySerializers in caseClasses | |
--- | |
.../scala/deser/CaseClassDeserializerModule.scala | 41 ++++++++++++++++++++-- | |
.../module/scala/ser/MapSerializerModule.scala | 23 ++++++++++-- | |
2 files changed, 58 insertions(+), 6 deletions(-) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package test | |
import scala.annotation.target.field | |
import Thing._ | |
import javax.xml.bind.annotation.XmlAnyAttribute | |
import org.scalastuff.scalabeans.types.ScalaType | |
import org.scalastuff.scalabeans.sig.{Mirror, ClassDeclExtractor} | |
import org.scalastuff.scalabeans.PropertyDescriptor | |
import org.scalastuff.scalabeans.Preamble._ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package test; | |
import java.io.IOException; | |
import java.util.TreeMap; | |
import com.fasterxml.jackson.core.*; | |
import com.fasterxml.jackson.databind.*; | |
import com.fasterxml.jackson.databind.annotation.*; | |
import com.fasterxml.jackson.databind.deser.std.StdKeyDeserializer; | |
import com.fasterxml.jackson.databind.ser.std.StdSerializer; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package test | |
import scala.collection.{immutable => im} | |
import com.fasterxml.jackson.databind.annotation.JsonDeserialize | |
import com.fasterxml.jackson.databind.deser.std.StdKeyDeserializer | |
import com.fasterxml.jackson.databind.{ObjectMapper, DeserializationContext} | |
import com.fasterxml.jackson.module.scala.DefaultScalaModule | |
import com.fasterxml.jackson.databind.JsonSerializer | |
import com.fasterxml.jackson.databind.annotation.JsonSerialize | |
import com.fasterxml.jackson.databind.SerializerProvider |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package test | |
import org.codehaus.jackson.map.ObjectMapper | |
import com.fasterxml.jackson.module.scala.DefaultScalaModule | |
object JacksonMapTest { | |
def main(args: Array[String]): Unit = { | |
val map = Map((2, 3) -> "Horsey") | |
val mapper = new ObjectMapper() |