Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

lift-json should not produce invalid json from JValue instance #1300

Closed
fleipold opened this Issue Jul 27, 2012 · 5 comments

Comments

Projects
None yet
4 participants

JField currently extends JValue

This leads to expressions like the following being compilable:

JObject(List(JField("field1", JField("field2", JString("value")))))

This in turn renders to

{
  "field1":"field2":"value"
}

which is not valid json.

Currently the ~-operator produces such structures, so there is a bit of work when fixing this...

Looking at the [Json][http://www.json.org/] grammar we can see that:

value:  string |  number | object | array | true | false | null

but not pair as they call the JField.

Member

jonifreeman commented Jul 27, 2012

This will be fixed in version which will probably be Lift 3.0. See:

fa91789

Cool, thanks. I only checked on trunk.

Owner

Shadowfiend commented May 13, 2014

@jonifreeman Can we merge a PR for https://github.com/lift/framework/compare/joni_scala_2.10 into lift_30 and close this ticket, or was there more work you wanted to put in there?

Member

jonifreeman commented May 14, 2014

Yes, this should be ok. They used this branch in json4s when they forked lift-json. AFAIK it has been working well there.

Owner

Shadowfiend commented May 14, 2014

Perfect. I'll open up a PR to do that then.

@fmpwizard fmpwizard added this to the 3.0-M2 milestone Jul 2, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment