Serializing multidimensional arrays to JSON with JAXB and MOXy -


i'm serializing next two-dimensional string array jaxb/moxy:

@xmlelement(name = "row") @xmlelementwrapper(name = "rows") private string[][] rows; 

and want serialized next json:

"rows": [  ["1", "2"],  ["3","4"],  ["5","6"] ] 

but instead:

"rows": [         {             "item": ["1","2"]         },         {             "item": ["1","2"]         },         {             "item": ["1","2"]         }  ] 

any ideas how fix this?

note: i'm eclipselink jaxb (moxy) lead , member of jaxb (jsr-222) expert group.

the current support multi-dimensional arrays in moxy matches xml representation defined in jaxb specification. update answer once have come appropriate workaround you.

below enhancement request can use track our first-class support use case:


Comments

Popular posts from this blog

blackberry 10 - how to add multiple markers on the google map just by url? -

php - guestbook returning database data to flash -

delphi - Dynamic file type icon -