Re: [json-lib-user] Error message when transforming to Bean
Brought to you by:
aalmiray
From: Kiril <kir...@gm...> - 2008-05-23 21:52:38
|
No, not at all, all I do with jsonConfig is to set the Root class: jsonConfig.setRootClass( Filter.class ); The problem occurs when morphing beans from json, not reading them. In this case the missing method is a setter for the class property... Kiril. On Fri, May 23, 2008 at 4:34 PM, Andres Almiray <aal...@ya...> wrote: > Hi Kiril, > > Are you by any chance overriding the default exclusion flags by setting > jsonConfig.setIgnoreDefaultExcludes(true) ? > JsonConfig will exclude class, metaClass and declaringClass properties by > default, any property that does not have a read method and has not been > excluded nor filtered out would trigger a logging warning (as it seems to be > your case). > > 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. > > > ----- Original Message ---- > From: Kiril <kir...@gm...> > To: jso...@li... > Sent: Friday, May 23, 2008 1:00:36 PM > Subject: [json-lib-user] Error message when transforming to Bean > > Hi all, > > I use BeanMorpher to get classes from JSON, all works Ok, but each time I > get this message: > Property 'MyClass.class' has no write method. SKIPPED. > As I use this frequently, the log is full with these. > Any idea what I must do to avoid this? I understand that some setter is > expected, but which one?? > > Here is the code: > Morpher myMorpher = new BeanMorpher( MyClass.class,morpherRegistry); > morpherRegistry.registerMorpher(myMorpher); > MyClass.class = (MyClass)morpherRegistry.morph(MyClass.class,json); > > Thanks in advance, > > Kiril. > > |