Questions tagged [lift-json]

the lift-json parsing and formatting utilities for JSON

A JSON abstract syntax tree (AST) providing the following features:

  • Fast JSON parser
  • LINQ style queries
  • Case classes can be used to extract values from parsed JSON
  • Diff & merge
  • DSL to produce valid JSON
  • XPath like expressions and HOFs to manipulate JSON
  • Pretty and compact printing
  • XML conversions
  • Serialization
  • Low level pull parser API

Github: https://github.com/lift/lift/tree/master/framework/lift-base/lift-json/

130 questions
0
votes
1 answer

lift what is the difference \ and \\ operators when parsing json

using net.liftweb.json what is the difference \ and \ operators when parsing json ? import net.liftweb.json._ val parsed = JsonParser.parse(jsonString) val name = parsed.\("firstName") val userId = parsed.\\("userId")
igx
  • 4,101
  • 11
  • 43
  • 88
0
votes
2 answers

Designing serialization library in Scala with type classes

I have system where I need to serialize different kinds of objects to json and xml. Some of them are Lift MetaRecords, some are case classes. I wanted to use type classes and create something like: trait Serializable[T] { serialize[T](obj: T):…
Lukasz
  • 3,135
  • 4
  • 20
  • 24
0
votes
2 answers

Modifying a JSON object with lift-json

I'm in the process of choosing a good Scala JSON library, and the consensus seems to be that lift-json is currently the best choice. After playing with it (version 2.5.1) for a spell, I've been able to do most of the things I needed fairly easily,…
Nicolas Rinaudo
  • 6,068
  • 28
  • 41
0
votes
1 answer

Used Scala with Lift-Json working fine but why performance is varying?

I used Scala with Lift-Json and working fine. when i am testing with Dummy Data for Performance check, i am getting different figures means not comparable. here goes my performance check Data in Rows Weight ForRead (ms) Parse (ms) 10000 …
Devendar
  • 323
  • 1
  • 4
  • 20
0
votes
1 answer

Working with Lift-JSON in Scala convert map to string

i am working on Scala - i used JacksMapper it works fine, here goes the code import java.io.FileOutputStream import java.io.ObjectOutputStream import java.io.FileInputStream import java.io.ObjectInputStream import scala.util.Marshal import…
Devendar
  • 323
  • 1
  • 4
  • 20
0
votes
0 answers

How to get Jar file - Lift-JSON for Scala 2.10.1?

I tried and completed these steps, Downloaded Lift2.5 Version and changed scala_210/lift_json/build.sbt file with my scala version After that I ran build.sbt file. After some downloads and some updating all showing Successfully Done. After I got…
Devendar
  • 323
  • 1
  • 4
  • 20
0
votes
1 answer

Making an Ajax request in Lift

I am trying out the Lift web framework, but I am having a hard time understanding a basic aspect. I have lift 2.5 M4 running on my localhost:8080. How can I make a CURL request with some parameters, for instance…
flavian
  • 28,161
  • 11
  • 65
  • 105
0
votes
1 answer

Serialiaze a map[A,B] with lift-json knowing A<->String

I want to serialize a HashMap having type HashMap[Coord,Unite] with lift-json. those types are specific to my project but there is Coord -> String with the toString function and i can have my Coord back from String (even if it's not coded here but…
Atol
  • 569
  • 4
  • 12
-1
votes
1 answer

Scala: Partial function error: use _ if you want to treat it as a PartialFunction

The following piece of code does not work: FileSystems.getDefault.getPath is from the java.nio package Update: Method createCalculation is: Note: MyLocation is a case class that extends MyMessage def creatCalculation(myPlace: MyLocation): MyMessage…
user3825558
  • 585
  • 1
  • 8
  • 24
-2
votes
1 answer

json arrays in arrays parsing with scala and lift

Still being a noob in Scala i am hitting a wall here. Using Scala 2.12.1 and liftweb 3.0.1 I have json code like { "traces":[ [ { "matcher":"Matcher1", "score":{ "assigned":50, …
Coentje
  • 501
  • 1
  • 6
  • 15
1 2 3
8
9