Apologies in advance for cross-posting: I submitted this question to the spray user list, but the list appears to be moderated, and nobody seems to be home. Hopefully SO is a better venue.
I am having difficulty serializing complex data structures…
I am writing a RESTful interface and I would like to marshall and unmarshall JSON ready for Ember Data.
The wrinkle is that Ember Data wants the entity name and the two libraries I've tried, spray-json and json4s, don't appear to do this…
I'm trying to implement a controller in Play2 which exposes a simple REST-style api for my db-tables. I'm using squeryl for database access and spray-json for converting objects to/from json
My idea is to have a single generic controller to do all…
I need to make a post request with Spray but i don't understand how to capture the request at server side. This is my code:
CLIENT:
.
.
val pipeline: HttpRequest => Future[HttpResponse] = sendReceive
val fileName = "document.docx"
val path =…
The site I'm working with returns empty arrays for optional fields that have no values.
i.e. given these definitions -
case class Sample(f1: Option[Seq[F1]], id: Option[Int])
implicit val formatF1 = jsonFormat4(F1)
implicit val formatSample =…
For example suppose I have
case class Test(a: String, b: String)
...
implicit val testFormat = jsonFormat2(Test.apply)
and a json with an extra c field:
val test = "{\"a\": \"A\", \"b\": \"B\", \"c\": \"C\"}"
then I want to find a way…
I am new to scala. I have one parameter which can be either string, boolean or number. I don't know before which data type will come. Earlier for number I had following code.
Try {
JsNumber(parameter._x.trim())
} match {
case…
I have newly started working on scala. I have following json array:
[
{
"id": "1",
"formatType": "text",
"value": "bgyufcie huis huids hufhsduhfsl hd"
},
{
"id": "2",
"formatType": "text size",
"value": 12
},
{
…