convert to Dist::Zilla
[gitmo/MooseX-Storage.git] / lib / MooseX / Storage / Format / JSON.pm
index bc8316c..d926bcf 100644 (file)
@@ -1,4 +1,3 @@
-
 package MooseX::Storage::Format::JSON;
 use Moose::Role;
 
@@ -7,9 +6,6 @@ no warnings 'once';
 use JSON::Any;
 use utf8 ();
 
-our $VERSION   = '0.32';
-our $AUTHORITY = 'cpan:STEVAN';
-
 requires 'pack';
 requires 'unpack';
 
@@ -21,7 +17,7 @@ sub thaw {
 
 sub freeze {
     my ( $self, @args ) = @_;
-    my $json = JSON::Any->new->objToJson( $self->pack(@args) );
+    my $json = JSON::Any->new(canonical => 1)->objToJson( $self->pack(@args) );
     utf8::decode($json) if !utf8::is_utf8($json) and utf8::valid($json); # if it's valid utf8 mark it as such
     return $json;
 }