resteasy migration
Bryan Kearney
bkearney at redhat.com
Tue Mar 16 19:06:52 UTC 2010
I have gotten rails to play with it mostly. I would suggest if we move
that we make use of the @Wrapped annotation on all collections. I pushed
2 commits that show an example of it.
-- bk
On 03/15/2010 06:10 PM, Jesus M. Rodriguez wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> So Justin& I (well mostly Justin) did the resteasy migration. Biggest
> change is that the JSON output is different (but more correct).
>
> Jersey generated natural form json but didn't handle lists correctly.
> Resteasy uses Jettisons mapped notation but handles the lists better.
>
> This is my JsonTestObject as a natural notation (jersey used):
>
> {"name":"myname","parent":{"name":"parentname","parent":{"name":"parent1"},"stringList":["string2","string3","child"]},"stringList":["string2","string3","child"]}
>
> Where as the mapped notation has the object dictionary inside
> another dictionary with a single root element key. The key is
> either the value of the XmlRootElement annotation in the class
> OR the class name itself:
>
> {'jsontest': {'name': 'now', 'parent': {'name': 'parentname', 'stringList':
> ['string3', 'string4']}, 'stringList': ['string1', 'string2']}}
>
> JsonTestObject: http://pastie.org/870667
>
> Resteasy still doesn't handle returning a Boolean object though :)
> "Could not find MessageBodyWriter for response object of type:
> java.lang.Boolean of media type: application/json"
>
> Before we push this to master, we'd like to get the client working against
> the resteasy branch and fix up the nosetests which fail right now
> because the format is different.
>
> Candlepin Resteasy branch:
> http://git.fedorahosted.org/git/candlepin.git/?p=candlepin.git;a=shortlog;h=refs/heads/resteasy
>
> git checkout --track -b resteasy origin/resteasy
>
> jesus
>
> - --
> jesus m. rodriguez | jesusr at redhat.com
> principal software engineer | irc: zeus
> red hat systems management | 919.754.4413 (w)
> rhce # 805008586930012 | 919.623.0080 (c)
> +---------------------------------------------+
> | "Those who cannot remember the past |
> | are condemned to repeat it." |
> | -- George Santayana |
> +---------------------------------------------+
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.9 (GNU/Linux)
> Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/
>
> iEYEARECAAYFAkuesEIACgkQvJZ57YntiYPIoQCfSd6xedRcqXFim3zRSP3NgXiI
> gwsAn1s26KQ1PHCxDMRj3bLXtV/fsSrv
> =ivyi
> -----END PGP SIGNATURE-----
> _______________________________________________
> candlepin mailing list
> candlepin at lists.fedorahosted.org
> https://fedorahosted.org/mailman/listinfo/candlepin
More information about the candlepin
mailing list