seam - RestEasy and JSON - how to avoid quotes around a number? -


i using resteasy marchal entities json. works okay somehow every thing represented string. e.g.

@xmlrootelement(name="testobject") public class testobject {     private long value;     public long getvalue(){         return value;     } } 

instead of creating like: {testobject:{value:1234}}

it creates {testobject:{value:"1234"}} (please note " " around number)

so long value converted string. how can avoid that?

i've asked on jackson forum resteasy using json marchaling said caused going java->xml->json. there doesn't seem resteasy forum , on seam forum no 1 answer question.

does else have same problem?

regards

okay problem resteasy+seam uses jettison default (and not jackson). jettison marchaling via java->xml->json.

the jackson jars aren't included in seam distribution have download resteasy , copy jars mention jackson lib directory. when resteasy finds resteasy-jackson-provider.jar in classpath, jackson used instead of jettison.

one problem had when moving jackson jettison cycling references. jettison annotate method (e.g. @manytoone relationship) @xmltransient. jackson have annotate @jsonignore


Comments

Popular posts from this blog

c++ - Convert big endian to little endian when reading from a binary file -

C#: Application without a window or taskbar item (background app) that can still use Console.WriteLine() -

unicode - Are email addresses allowed to contain non-alphanumeric characters? -