Fixed:
d977c95589fbd5de8bc45e43c2867097dd75a807
-Ross
On Nov 30, 2009, at 8:33 PM, harryh wrote:
> Done:
>
> http://github.com/dpp/liftweb/issues/#issue/214
>
> On Nov 30, 6:33 pm, Ross Mellgren wrote:
>> If you file an issue on github I'll write up a patch for you tonight.
>>
>> -Ross
>>
Hi,
This is from JSON RFC (http://www.ietf.org/rfc/rfc4627.txt): "A JSON
text is a serialized object or array."
I checked with another parser (http://www.jsonlint.com) and it fails
too when given just JSON value:
"syntax error, unexpected TNUMBER, expecting '{' or '[' at line 1"
So perhaps a bet
On review board: http://reviewboard.liftweb.net/r/131/
I did run across another infelicity when writing the test -- apparently
JsonParser crashes when given a scalar value, as opposed to an array or object:
scala> parse("\"foobar\"")
net.liftweb.json.JsonParser$ParseException: unexpected null
Ne
Done:
http://github.com/dpp/liftweb/issues/#issue/214
On Nov 30, 6:33 pm, Ross Mellgren wrote:
> If you file an issue on github I'll write up a patch for you tonight.
>
> -Ross
>
> On Nov 30, 2009, at 6:30 PM, harryh wrote:
>
> > Yes, what Ross said. Further, taking a look at JsonParser.scala t
What I find particularly interesting is that the JSON spec lacks \',
but gains \/, relative to the ECMA-262 (javascript) spec that JSON
supposedly derives from.
-Ross
On Nov 30, 2009, at 6:34 PM, Nathan Folkman (Foursquare) wrote:
> Here's the complete list from http://json.org/:
>
> char:
>
Here's the complete list from http://json.org/:
char:
Any Unicode character except " or \ or control-character.
\"
\\
\/
\b
\f
\n
\r
\t
\u four-hex-digits
- n
On Nov 30, 6:30 pm, harryh wrote:
> Yes, what Ross said. Further, taking a look at JsonParser.scala the
> bug appears to be on line ~
If you file an issue on github I'll write up a patch for you tonight.
-Ross
On Nov 30, 2009, at 6:30 PM, harryh wrote:
> Yes, what Ross said. Further, taking a look at JsonParser.scala the
> bug appears to be on line ~202 where there are a couple of missing
> escape sequences: \/ as well as \f.
Yes, what Ross said. Further, taking a look at JsonParser.scala the
bug appears to be on line ~202 where there are a couple of missing
escape sequences: \/ as well as \f.
-harryh
On Nov 30, 6:20 pm, Ross Mellgren wrote:
> He's double escaping so that scala's string interpretation will put a
>
He's double escaping so that scala's string interpretation will put a
raw \ in there, so that it's an escaped forward slash (\/) to the JSON
parson, as I understand it. The output should be either invalid escape
or forward slash, but not backslash unless the input was \\.
-Ross
On Nov 30, 2
Harry, I think you're double-escaping the slash. This works:
scala> import net.liftweb.json._
scala> val s1 = "{ \"id\": \"America/New_York\" }"
s1: java.lang.String = { "id": "America/New_York" }
scala> JsonParser.parse(s1)
res0: net.liftweb.json.JsonAST.JValue = JObject(List(JField(id,JString
(A
10 matches
Mail list logo