Re: [json-lib-user] Bug in JsonSlurper.parse(Reader)
Brought to you by:
aalmiray
From: Tom N. <tmn...@gm...> - 2008-12-08 20:47:41
|
I skirted around the issue by doing the following: new JsonSlurper().parseText( DefaultGroovyMethods.getText( reader ) ) since that's basically what you're doing anyway :) I should mention that StringBuilder should be (a little) faster than StringBuffer too since it's not synchronized. You don't need the thread-safe implementation there because it's a method-scoped field. Or... I guess you need to use it for backwards-compatibility since StringBuilder was introduced in 1.5... right? Thanks Andres! On Mon, Dec 8, 2008 at 3:16 PM, Andres Almiray <aal...@ya...> wrote: > Thanks Tom! > > Will be taking care of this issue shortly. > > Cheers, > Andres > > ------------------------------------------- > http://jroller.com/aalmiray > http://www.linkedin.com/in/aalmiray > -- > What goes up, must come down. Ask any system administrator. > There are 10 types of people in the world: Those who understand binary, and > those who don't. > To understand recursion, we must first understand recursion. > > ________________________________ > From: Tom Nichols <tmn...@gm...> > To: jso...@li... > Sent: Monday, December 8, 2008 12:12:01 PM > Subject: [json-lib-user] Bug in JsonSlurper.parse(Reader) > > When I use: > new JsonSlurper().parse( someReader ); > it looks like it is mangling the data and usually throws a parsing error. > > Test case is attached. Tested against json-lib v2.2.2 > > Thanks! > > |