Merge branch 'master' of https://github.com/runarbu/Catalyst-Action-REST into runarbu...
John Napiorkowski [Tue, 5 Dec 2017 15:03:30 +0000 (10:03 -0500)]
1  2 
lib/Catalyst/Controller/REST.pm

@@@ -147,11 -147,22 +147,22 @@@ L<JSON::XS> installed.  The C<text/x-js
  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<json_options> are used when decoding incoming JSON, and C<json_options_encode> 
+ 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<text/javascript> => C<JSONP>
  
  If a callback=? parameter is passed, this returns javascript in the form of: $callback($serializedJSON);
@@@ -293,7 -304,6 +304,7 @@@ __PACKAGE__->config
          'application/json'   => 'JSON',
          'text/x-json'        => 'JSON',
      },
 +    'compliance_mode' => 0,
  );
  
  sub begin : ActionClass('Deserialize') { }