Implicit conversions from a given object of type T
to a JSON String
Implicit conversions from a given object of type T
to a JSON String
import com.paypal.cascade.common.json._ case class AnObject(v1: String, v2: Long, v3: List[String]) val a = AnObject("value", 5L, List("hi", "there") a.toJson
the type of this object
Implicit conversions from a JSON String to a variety of object types
Implicit conversions from a JSON String to a variety of object types
import com.paypal.cascade.common.json._ """{"key":"value"}""".toMap
Created by awharris on 1/17/14.
Created by awharris on 1/17/14.
Patterns adapted from https://coderwall.com/p/o--apg
Known caveats:
null
is a valid JSON value. Case classes that will
be serialized/deser'd need to include their own validation to guard against unintentional nulls.
Convenience implicits for reading objects from and writing objects to JSON Strings