thanks
here's an incomplete list of options:
- Resource methods can return instances of grails.converters.JSON. The
grails-jaxrs plugin has a provider for converting between JSON
representations and grails.converters.JSON objects (see also
http://code.google.com/p/grails-jaxrs/wiki/AdvancedFeatures#Entity_providers)
* JSON instances can be created by calling 'as JSON' on a Grails
domain objects
* JSON instances can also be created with grails.web.JSONBuilder:
With JSONBuilder you can create any custom JSON repsonse you like
- If you want to write a custom provider please take a look at
http://code.google.com/p/grails-jaxrs/wiki/AdvancedFeatures#Custom_providers
* With a custom provider you can use any JSON lib you like.
Does that help?
Cheers,
Martin
Am 21.11.11 19:41, schrieb mikes:
> Can anyone give me pointers on how to create custom JSON(custom
> provider) using JAXRS in Grails?
>
> thanks
--
Martin Krasser
blog: http://krasserm.blogspot.com
code: http://github.com/krasserm
twitter: http://twitter.com/mrt1nz
I need to now work on the PUT/POST stuff. Any pointers on this would
be really helpful.
Thanks again!
On Nov 22, 5:33 am, Martin Krasser <krass...@googlemail.com> wrote:
> Hi mikes,
>
> here's an incomplete list of options:
>
> - Resource methods can return instances of grails.converters.JSON. The
> grails-jaxrs plugin has a provider for converting between JSON
> representations and grails.converters.JSON objects (see alsohttp://code.google.com/p/grails-jaxrs/wiki/AdvancedFeatures#Entity_pr...)
> * JSON instances can be created by calling 'as JSON' on a Grails
> domain objects
> * JSON instances can also be created with grails.web.JSONBuilder:
> With JSONBuilder you can create any custom JSON repsonse you like
>
> - If you want to write a custom provider please take a look athttp://code.google.com/p/grails-jaxrs/wiki/AdvancedFeatures#Custom_pr...
Am 23.11.11 22:39, schrieb mikes:
> Thanks, Martin. That's really helpful. I wrote a custom provider to
> create custom JSON. That works great!
>
> I need to now work on the PUT/POST stuff. Any pointers on this would
> be really helpful.
I guess you already read the JAX-RS spec and the Jersey docs. Do you
have any specific question or problem?