Permalink
Browse files

Merge pull request #1166 from garu/patch-1

to_json/from_json deprecation note for hash options
  • Loading branch information...
2 parents 4c7d059 + 97cc712 commit 3089af3e89a62a5bfe151f9deddb21cbaa9542b8 @bigpresh bigpresh committed on GitHub Feb 11, 2017
Showing with 8 additions and 2 deletions.
  1. +8 −2 lib/Dancer.pm
View
@@ -841,12 +841,15 @@ only used to change the method of your request. Use with caution.
Deserializes a L<< Data::Dumper >> structure.
-=head2 from_json ($structure, %options)
+=head2 from_json ($structure, \%options)
Deserializes a JSON structure. Can receive optional arguments. Those arguments
are valid L<JSON> arguments to change the behaviour of the default
C<JSON::from_json> function.
+Compatibility notice: C<from_json> changed in 1.3002 to take a hashref as options,
+instead of a hash.
+
=head2 from_yaml ($structure)
Deserializes a YAML structure.
@@ -1804,12 +1807,15 @@ L<Dancer::Template::Abstract> for further details.
Serializes a structure with L<< Data::Dumper >>.
-=head2 to_json ($structure, %options)
+=head2 to_json ($structure, \%options)
Serializes a structure to JSON. Can receive optional arguments. Thoses arguments
are valid L<JSON> arguments to change the behaviour of the default
C<JSON::to_json> function.
+Compatibility notice: C<to_json> changed in 1.3002 to take a hashref as options,
+instead of a hash.
+
=head2 to_yaml ($structure)
Serializes a structure to YAML.

0 comments on commit 3089af3

Please sign in to comment.