JSON example

0 views
Skip to first unread message

Leandro

unread,
May 18, 2011, 10:41:56 AM5/18/11
to jax-doclets
Hi,

The JSON example generated by the jax-doclets creates something like:
{
'ClassName':
{
'field1': type 1,
'field2': type 2,
...

Is there a way to configure the doclet to generate the example like
this:
{
'field1': type 1,
'field2': type 2,
...

?

Thanks!

Stephane Epardaud

unread,
May 18, 2011, 10:44:31 AM5/18/11
to jax-d...@googlegroups.com
Not at the moment, but I suspect this is a valid feature request. What
is the marshaller (or which annotations do) you use to get this
output?
--
Stéphane Épardaud

Leandro Ferro Luzia

unread,
May 18, 2011, 11:01:03 AM5/18/11
to jax-d...@googlegroups.com
I'm using Jaxb Annotations in the bean, and the Jackson marshaller.
From what I saw in the source code, the method
JAXBClassWriter.printJSONExample always do this. I think we could set
some parameter and this method would check it.

2011/5/18 Stephane Epardaud <stephane...@gmail.com>:

--
--------------------------------------------------------------
Leandro Ferro Luzia

"Computer science is no more about computers than astronomy is about
telescopes." - Dijkstra

"There's nothing remarkable about it.
All one has to do is hit the right keys at the right time and the
instrument  plays itself" - Bach
----------------------------------------------------------------

Stephane Epardaud

unread,
May 18, 2011, 11:08:56 AM5/18/11
to jax-d...@googlegroups.com
OK, bad thing is that since this depends on the marshaller I can't
detect this since there's nothing in your code that tells me which
marshaller you're using. So it will have to be a parameter. Can you
open an issue on the google code project please?

Thanks.
--
Stéphane Épardaud

Reply all
Reply to author
Forward
0 new messages