X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Action-REST.git;a=blobdiff_plain;f=lib%2FCatalyst%2FController%2FREST.pm;fp=lib%2FCatalyst%2FController%2FREST.pm;h=b9c10d0a91d3e658a869a837e59de5d7713fb8a6;hp=3c9ec67cd2caa390895b0937b872d6b5f539c238;hb=d971b052b6b49206b9b9fb3a6ee5f3ed37d17489;hpb=370367cb80b925e50a4ea1bc759b06d1466f2627 diff --git a/lib/Catalyst/Controller/REST.pm b/lib/Catalyst/Controller/REST.pm index 3c9ec67..b9c10d0 100644 --- a/lib/Catalyst/Controller/REST.pm +++ b/lib/Catalyst/Controller/REST.pm @@ -147,11 +147,22 @@ L installed. The C content type is supported but is deprecated and you will receive warnings in your log. You can also add a hash in your controller config to pass options to the json object. +There are two options. C are used when decoding incoming JSON, and C +is used when encoding JSON for output. + For instance, to relax permissions when deserializing input, add: + __PACKAGE__->config( json_options => { relaxed => 1 } ) +To indent the JSON output so it becomes more human readable, add: + + __PACKAGE__->config( + json_options_encode => { indent => 1 } + ) + + =item * C => C If a callback=? parameter is passed, this returns javascript in the form of: $callback($serializedJSON);