Questions tagged [jerkson]

Jerkson is a Scala wrapper for Jackson which brings Scala's ease-of-use to Jackson's features.

Jerkson is a Scala wrapper for Jackson which brings Scala's ease-of-use to Jackson's features.

25 questions
7
votes
2 answers

Scanning a HUGE JSON file for deserializable data in Scala

I need to be able to process large JSON files, instantiating objects from deserializable sub-strings as we are iterating-over/streaming-in the file. For example: Let's say I can only deserialize into instances of the following: case class Data(val…
Ryan Delucchi
  • 7,718
  • 13
  • 48
  • 60
7
votes
1 answer

Deserializing JSON into user-defined case classes with Jerkson

I came across this excellent tutorial on processing JSON in Scala using Jerkson. In particular, I am interested in deserializing JSON into user-defined case classes. The article has a simple example case class Simple(val foo: String, val bar:…
Bob
  • 8,424
  • 17
  • 72
  • 110
5
votes
2 answers

Custom json serialization of structured scala case classes

I have some working jackson scala module code for roundtripping scala case classes. Jackson worked great for flat case classes but when I made one which contains a list of other case classes the amount of code I seemed to need was a lot. Consider:…
simbo1905
  • 6,321
  • 5
  • 58
  • 86
5
votes
1 answer

Strings maintaining leading and trailing quotes from JSON when using Jerkson

JSON in question: { "search_id": "", "type": "Search.filter", "query": "bar,club", "params": { "search_id": "", "user_id": "", "client": "ios", "lat": 40.73199375351, "lon": -74.00080404533901, "radius": 20 } } Code to…
Commander
  • 1,322
  • 2
  • 13
  • 29
3
votes
2 answers

how to pass generic types to Argonaut

I am trying to wrap Argonaut (http://argonaut.io) in order to serialize/deserialize JSON in a Scala project. We where using Jerkson before but as it has been discontinued we are looking for an alternative. This is the basic JSON wrapper import…
Christian Westman
  • 2,985
  • 1
  • 26
  • 28
2
votes
1 answer

Why can't I parse this JSON string with a custom Scala type (Jerkson)?

I've got the following code that is meant to parse the following JSON string with Jerkson, the Scala wrapper for Jackson: Code: val vertex = Json.parse[Ranked[UserVertex]](rawString) Json:…
crockpotveggies
  • 12,682
  • 12
  • 70
  • 140
2
votes
3 answers

Jerkson (Jackson) issue with scala.runtime.BoxedUnit?

Jerkson started throwing a really strange error that I haven't seen before. com.fasterxml.jackson.databind.JsonMappingException: No serializer found for class scala.runtime.BoxedUnit and no properties discovered to create BeanSerializer (to avoid…
crockpotveggies
  • 12,682
  • 12
  • 70
  • 140
2
votes
1 answer

Jerkson. Serializing map to JsValue

I am using built-in jerson with playframework 2, and all I want is to serialize map, containing values of different type: object AppWriter extends Writes[Application] { def writes(app: Application): JsValue = { Json.toJson(Map( …
Alex Povar
  • 4,890
  • 3
  • 29
  • 44
1
vote
2 answers

Scala JSON library that has automatic serialization (through introspection)

I'm looking for a good JSON library for Scala that can serialize an arbitrary object graph to JSON, without requiring me to write mapping code. Java's Jackson does this, but it isn't native to Scala and I'm having some trouble getting it to…
larspars
  • 1,640
  • 1
  • 15
  • 30
1
vote
3 answers

JsonProperty annotation does not work for Json parsing in Scala (Jackson/Jerkson)

I need to parse the following json string: {"type": 1} The case class I am using looks like: case class MyJsonObj( val type: Int ) However, this confuses Scala since 'type' is a keyword. So, I tried using @JsonProperty annotation from…
gjain
  • 4,468
  • 5
  • 39
  • 47
1
vote
2 answers

Jerkson Json parser for scala.

I have used Jerkson for scala, to serialize my list of objects to a JSON file. I'm able to decompose the object into JSON format object and written to a file. Now, I when I want to read it into my program for further processing I get this error.…
Learner
  • 1,685
  • 6
  • 30
  • 42
1
vote
1 answer

Deserializing case classes with Jerkson (nested)

Using a worksheet in the Eclipse Scala IDE (contains code and output). This simple code gives a ClassNotFoundException. For some reason, it can't seem to find the Address class. similar: Deserializing JSON into user-defined case classes with Jerkson…
zzz
  • 2,515
  • 4
  • 28
  • 38
1
vote
2 answers

Play! 2.1 / Why isn't my Jerkson dependency resolved?

Attempting to use the forked Jerkson library from https://github.com/randhindi/jerkson. Cloned a source dependency into the folder module and defined the following: object ApplicationBuild extends Build { val appName = "coolapp" val…
crockpotveggies
  • 12,682
  • 12
  • 70
  • 140
1
vote
2 answers

Json serialization in Scala 2.10

Before Play 2.1 and Scala 2.10 I used Jerkson. Unfortunatly there is no officially released Jerkson version compatible with Scala 2.10 (yet). I'm since using Jackson with Scala module but I don't have the desired behavior with Enumerations. I'm…
Sebastien Lorber
  • 89,644
  • 67
  • 288
  • 419
1
vote
2 answers

scala defining class with additional parameter for type

I'm using a case class which - among other parameters - is instantiated with a BigInt hexadecimal value. I use this case class to deserialize JSON messages via Jerkson/Jackson. The beauty of using Jackson is that the de/serialization works…
jans
  • 1,768
  • 3
  • 17
  • 22
1
2