fleipold
unread,May 22, 2013, 5:36:56 AM5/22/13Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Lift
Hi Group,
I have just come across an issue, where I had an invalid JSON string
and didn't get the feedback from the parser I expected.
My expectation would be along those lines:
@Test def shouldFindSyntaxError {
try {
val json = net.liftweb.json.parse(
"""
|{
| "x":"y"
""".stripMargin)
fail("Expected parser to throw but returned " + json)
}
catch { case e: Exception => {/*optionally assert on the
exception message*/} }
}
The output of executing that against 2.5-RC5 was
'java.lang.AssertionError: Expected parser to throw but returned
JNothing'
This lead to a really confusing error message, when trying to marshal
a case class instance.
Does my expectation make sense? Should I file a bug?
BTW: I tried to write the test in the lift code base, but found out
that the current trunk has a flaky test case ("Any valid json can be
parsed"), which fails when a Buffer has exactly the size of the input
to be parsed.
Is there documentation on the development process (I could find
neither branch nor tag associated with 2.5-RC5)?
Best Regards,
Felix Leipold