Hi,<div><br></div><div>I have been fighting with these issues.</div><div><br></div><div>Here is the proposed solution i am currently using on OpenStack Java SDK.</div><div><br></div><div>*Every representation should implement a common interface*</div>
<div><br></div><div>The jaxb annotations for marshalling and unmarshalling XML reside on xml implementation class</div><div>The gson annotations for serialization and deserialization of JSON reside on json implementation class</div>
<div><br></div><div>This approach is unobstrussive with XML/JSON representations</div><div><br></div><div>I think 95% of the API works well mixing jaxb/gson annotations on the same implementation classes.</div><div><br></div>
<div>This has another advantage, you can switch from one to another service provider sharing the same model,</div><div>that's the interfaces model but the implentation.</div><div> </div><div>Does it make sense for you?</div>
<div><br></div><div>Luis<br><br><div class="gmail_quote">On Tue, Apr 10, 2012 at 1:11 AM, Jay Pipes <span dir="ltr"><<a href="mailto:jaypipes@gmail.com">jaypipes@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="HOEnZb"><div class="h5">On 04/09/2012 07:07 PM, Jorge Williams wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
On Apr 9, 2012, at 6:03 PM, Justin Santa Barbara wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
    How about we discuss this further at the summit :-)<br>
<br>
<br>
I think that's a sensible proposal. We're not likely to reach a good<br>
conclusion here. I think my viewpoint is that even json-dressed-as-xml<br>
is fine; no end-user gives two hoots what our JSON/XML/HPSTR looks<br>
like. I'd wager most users of the EC2 API have never even seen the<br>
data representation!<br>
</blockquote>
<br>
<br>
I take it you didn't attend the glorious JSON debate of a couple of<br>
summits ago :-)<br>
</blockquote>
<br></div></div>
Glorious it was indeed.<div class="im"><br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I'm up for round two,<br>
</blockquote>
<br></div>
Only with beer. :) I still owe you a couple I think!<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
-jOrGe W.<br>
<br>
</blockquote><div class="HOEnZb"><div class="h5">
<br>
______________________________<u></u>_________________<br>
Mailing list: <a href="https://launchpad.net/~openstack" target="_blank">https://launchpad.net/~<u></u>openstack</a><br>
Post to     : <a href="mailto:openstack@lists.launchpad.net" target="_blank">openstack@lists.launchpad.net</a><br>
Unsubscribe : <a href="https://launchpad.net/~openstack" target="_blank">https://launchpad.net/~<u></u>openstack</a><br>
More help   : <a href="https://help.launchpad.net/ListHelp" target="_blank">https://help.launchpad.net/<u></u>ListHelp</a><br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br>-------------------------------------------<br>Luis Alberto Gervaso Martin<div>Woorea Solutions, S.L<br>CEO & CTO<br>mobile: (+34) 627983344<br>
<a href="mailto:luis.gervaso@gmail.com" target="_blank">luis@</a><a href="http://woorea.es/" target="_blank">woorea.es</a></div><br>
</div>