spray-json Questions

7

I'm new to AJAX and javascript. In my project, I have to get a json object in my javascript file. I've used spray-json and it shows me the json object in the url. http://localhost:8081/all-modules ...
Wivestad asked 6/3, 2014 at 7:14

2

Solved

How do I serialize Map[String, Any] with spray-json? I try val data = Map("name" -> "John", "age" -> 42) import spray.json._ import DefaultJsonProtocol._ data.toJson It says Cannot find Js...
Sclerous asked 18/9, 2014 at 15:11

2

Solved

I'm new to the Spray-Json API and I'm trying to parse a Json response from the Docker REST API. There is a clean example of the usage of Spray-Json to parse this Google Map Json response : { "r...
Zettazeugma asked 11/12, 2013 at 15:42

2

Here is spray-json example. Here is NullOptions trait. The problem is when I declare a case class say object MyJsonProtocol extends DefaultJsonProtocol { implicit val some: RootJsonFormat[Some] ...
Specification asked 19/1, 2015 at 6:51

1

Solved

I have this route: val routes = pathPrefix("api") { path("ElevationService" / DoubleNumber / DoubleNumber) { (long, lat) => post { requestContext => println(long, lat) } } } This w...
Athamas asked 30/12, 2014 at 15:1

1

Solved

I'm using spray and I need to return a json object through a method. val route = path("all-modules") { get { respondWithMediaType(`text/html`) { complete( configViewer.findAllModules.toStrin...
Francinefrancis asked 28/2, 2014 at 9:8

1

Solved

I'm using val akkaV = "2.2.3" val sprayV = "1.2.0" Seq( "io.spray" % "spray-can" % sprayV, "io.spray" % "spray-routing" % sprayV, "io.spray" %% "spray-json" % "1.2.5", "io.spray" % "spray-tes...
Combustible asked 5/12, 2013 at 19:22

1

Solved

I have the following route setup, but when my map is returned in the first complete block I get an error: could not find implicit value for evidence parameter of type spray.httpx.marshalling.Marsh...
Roturier asked 11/9, 2013 at 20:40

1

Solved

Just trying out the spray-json, and it seems to be having problem finding my JsonProtocols I have setup. I have the following dependencies: "io.spray" % "spray-servlet" % "1.2-M8", "io.spray" % "s...
Agglutinative asked 22/8, 2013 at 4:42

1

Solved

When spray (spray.io) produces a rejection, it responds with a string body. Since all my API clients will assume that my API only returns json, I'd like globally make every rejection a valid json o...
Genome asked 5/6, 2013 at 0:0

1

Solved

I am trying to use spray-json in scala to recognize the choice between Ec2Provider and OpenstackProvider when converting to Json and back. I would like to be able to give choices in "Provider", and...
Rolanda asked 12/5, 2013 at 21:37

1

Solved

I need to expose a Spray service that accepts JSON payload. Where can I find a sample that would demonstrate such a feature?
Synapse asked 11/4, 2013 at 21:18

© 2022 - 2024 — McMap. All rights reserved.