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
1
vote
1 answer

lift-json, proguard and android

I'm working on a multiplatform game (desktop and Android) and I'm currently working on serialization. I use lift-json. It works great on desktop but on Android it's a nightmare: By exemple, if I write case class A(int:Int) implicit val formats =…
Atol
  • 569
  • 4
  • 12
0
votes
1 answer

play framework file missing needed by Diff

I get this error when trying to use the lift-json library with scala play: "The file could not be compiled. Error raised is : error while loading Diff, class file needed by Diff is missing. reference type Serializable of package scala refers to…
user1253952
  • 1,577
  • 8
  • 22
  • 34
0
votes
1 answer

MongoDB ObjectID as JSON using lift-json

I'm using Bowler framework for some REST API's (internally uses lift-json module for heavy lifting) and have the following case class: case class Item(_id : ObjectId, name : String, value : String) When I return this case object back to client I…
cracked_all
  • 1,331
  • 1
  • 11
  • 26
0
votes
1 answer

extracting case classes with scala lift-json when json is variable

I'm trying to extract the following json values // a 'Change item with a list of values { "@count":"2", "change":[{ "@webLink":"http://localhost:8080/viewModification.html?modId=6&personal=false", …
Scott Weinstein
  • 18,890
  • 14
  • 78
  • 115
0
votes
1 answer

Parsing document fragments with lift-json

I'm trying to parse a JSON document with lift-json when I may not know the exact structure and order of the document that I'm parsing. The document contains list of "objects", all organized into sections for that object type with each section named…
0
votes
1 answer

Isabelle/HOL theory (HOL.Imperative_HOL.ex.Imperative_Quicksort) as Json with scala-isablle and lift framework

I am using https://github.com/dominique-unruh/scala-isabelle/ to digest Isabelle/HOL formalization of quicksort algorithm https://isabelle.in.tum.de/library/HOL/HOL-Imperative_HOL/Imperative_Quicksort.html. I managed to import Quicksort theory into…
TomR
  • 2,696
  • 6
  • 34
  • 87
0
votes
0 answers

Scala Yield - Liftweb Json for loop not working for single element

The following code is working perfectly for the json has more than one elements but when it encountered single element, it is failing and throwing the following exception. "Exception":"net.liftweb.json.MappingException: No usable value for…
paul
  • 3
  • 3
0
votes
1 answer

Issue with parsing nested JSON values with Lift-JSON

I'm using Scala 2.12 and trying to parse the below JSON file. { "comp1": { "metrics": { "operation1": { "alias": "activity_operation", "weight": 10 }, "operation2": { …
user3497321
  • 443
  • 2
  • 6
  • 15
0
votes
0 answers

How to update nested fields of Json using scala and Jackson or any other Json framework

I want to edit a nested field of a Json using its path as a string. The path comes from a variable. { "Type": "phone", "os": "android", "Transaction": { "Date": { Day: "22", Month: "Jan" }, "value": "2000" } } I want…
Bishamon Ten
  • 479
  • 1
  • 6
  • 20
0
votes
1 answer

Scala JSON If key matches value return string

I have the JSon response as given below. If metadata's Organic=true then label='true-Organic', else label='non-Organic' in the end => return List or Map[modelId,label] import net.liftweb.json.{DefaultFormats, _} object test1 extends App { val…
byomjan
  • 119
  • 1
  • 8
0
votes
2 answers

Parse json and based on value return a list of keys

Scala Experts , need your help . task is to parse this json and return list of ModelIds for store 'livingstone' which has 'organic' = true. In this case only RT001 has organic value as true.Please help. Note: trying to use existing liftweb library…
byomjan
  • 119
  • 1
  • 8
0
votes
1 answer

Can't install net.liftweb:lift-json_2.13 in Databricks

I am trying to install net.liftweb:lift-json_2.13:3.4.1 into a Databricks cluster (Apache Spark 2.4.4, Scala 2.11) However I am getting the following error: java.lang.RuntimeException: unresolved dependency: net.liftweb:lift:1.2.1: not found When I…
Flavio Pegas
  • 388
  • 1
  • 9
  • 26
0
votes
1 answer

Map frequently changing JSON value to corresponding element in Scala

I have a JSON value like { "valType": "Integer", "data": 5 } or { "valType": "Integer", "data": [2, 3] } or { "valType": "String", "data": "value1" } or { "valType": "String", "data": ["string1",…
user811602
  • 1,314
  • 2
  • 17
  • 47
0
votes
1 answer

Parsing JSON file in Scala

I've got a JSOn…
Appy22
  • 119
  • 9
0
votes
1 answer

Parsing nested JSON values with Lift-JSON

Scala 2.12 here trying to use Lift-JSON to parse a config file. I have the following myapp.json config file: { "health" : { "checkPeriodSeconds" : 10, "metrics" : { "stores" : { "primary" : "INFLUX_DB", "fallback" :…
hotmeatballsoup
  • 385
  • 6
  • 58
  • 136
1 2 3
8 9