I cloned spray json project, but see that Spray 2.0 branch origin/feature/2.0.0 last commit on November 2012. Does it mean that spray-json 2.0.0 has been stopped? What it status/plans for today?
I want to return list of json objects based on my case class objects.
Following is my spray router, which returns list of 'Appointment' objects.
trait GatewayService extends HttpService with SLF4JLogging {
import…
I try to create simple CRUD application with scala and spray-routing. I have the following route:
override def receive = runRoute {
path("entities" / LongNumber) { id =>
get {
produce(instanceOf[MyEntity]) {
func => ctx…
I have been trying to marshal a bunch of Maps but I get error. Here is the definitions:
import spray.httpx.SprayJsonSupport._
import spray.json.DefaultJsonProtocol._
import scala.collection.JavaConverters._
case class SchemaMap( schemaMap:…
Ok this is really bugging me.I have implemented a REST api using spray and scala,akka. I have successfully implemented spray get, post routes to query mysql database and give the json output.I am able to send the parameters within the post body but…
I am currently struggling with spray-json writing a protocol for my data model. For deserialization of JSON data to my data transfer objects, a DAO has to be contacted to check if an appropriate object exists, otherwise a DeserializationException…
I'm thinking to replace a field called "type" in a JSON in a POST with somethig like this
def rawJson = extract { _.request.entity.asString}
post {
rawJson { json =>
val new json = println(json.replace("\"type\":",…
I'm receiving the following error message when trying to parse some json:
[info] The future returned an exception of type: spray.httpx.PipelineException, with message:
Vector("eba760a81b177051b0520418b4e10596955adb98196c15367a2467ab66a19b5c",…
I use a spray-json for convert some case class into json, but i have a troubles with convert List to json:
case class Foo(id: Int)
object FooJsonSupport extends DefaultJsonProtocol with SprayJsonSupport {
implicit val fooFormats =…
I want to be able to read/write Json object from/to disk.
I admit, in Java it would have been taking me about 10 minutes.
Scala is a bit more challenging. I think that the main reason is not enough info on the net.
Anyway, this is what I have done…
I would like to load some data from JSON files when spray server starts-up, How can it be done? How can I write code when server loads like "init" method of Servlets?
The data I work with has a fixed 5 digits of precision. I'd like to enforce this when generating the JsNumber's so that i.e. floating point inaccuracies would not generate any .123450000000000001 output, ever.
Is this possible? I haven't found out a…