A part of my JSON response looks like this: I am using Json helpers provided by the Play framework to parse this Json like this: Now I need to e ...
A part of my JSON response looks like this: I am using Json helpers provided by the Play framework to parse this Json like this: Now I need to e ...
I am using play Reads validation helpers i want to show some custom message in case of json exception eg:length is minimum then specified or the given ...
i have to check either the password field is alphanumeric or not and if not it will throw custom Validation error i am using play-framework but gettin ...
i need to add alphanumeric field in play for that i am trying this code i want the "password" field to be alphanumeric i have added this custom va ...
I dynamically generate a bunch of Reads[JsObject] which I then have in a Seq[Reads[JsObject]]. In order to actually apply all these single Reads[JsObj ...
I'm using implicit val reads to map Json like: to a case class I can only make it work with an intermediate class that reflects the JSON friend ...
I'm just comparing how you would both serialize and deserialize an object to and from JSON in java. With the Playframework and Scala, I have to cre ...
I have the following case class: I am trying to implement a JSON Reads converter for it, so I can do the following: … but the incoming JSON has ...
Going to assume that I have two case classes: Child, Parent that look something like: Assume I've already implemented Writes[Child]. I'd like to im ...
I have the following where obj is a JsObject: This code will create a Some("0") if the approx pieces is "0" in the database. How can I change it s ...
What do I put instead of ??? so the code will type check? Or is there something else I should be doing? I'm using Play to generate JSON for classes B, ...
I'm using play.api.libs.json._ library. I have this kind of Scala class. I need to read / write this class in Json format. As there is no implicit rea ...
@TravisBrown helped me yesterday with an implicit function that returned a Writes[T], which I got working fine, but today I tried to adapt it for anot ...
I'm generating JSON for a speed where the units may vary. I have a SpeedUnit trait and classes that extend it (Knots, MetersPerSecond, MilesPerHour). ...
I have this json: How do I count child nodes under "errors" node? ...
I am trying to write a json reads combinator for type Map[Int, Long] I have this so far: I'm not sure how this will work, I tried doing (Map[Int, ...
I'm using Play! Scala 2.2 and I have a problem to render a class in Json : I have two classes with one depending of the other, as following : And ...
I have a base class that I inherit from for my case class, and when I use the regular Json.writes it doesn't seem to include the inherited fields. ...
Was following Play Frameworks's Scala Json api Docs when got this error : value read is not a member of play.api.libs.json.JsValue My Imports are : ...
Reads appears to do auto cast for me if the casting is possible. e.g., Float -> Int. For example, if the code gets json as following, the instan ...