move to github
[gitmo/MooseX-Storage.git] / lib / MooseX / Storage / Format / JSON.pm
index 1a100da..c557872 100644 (file)
@@ -1,14 +1,9 @@
-
 package MooseX::Storage::Format::JSON;
 use Moose::Role;
 
 no warnings 'once';
 
 use JSON::Any;
-use utf8 ();
-
-our $VERSION   = '0.31';
-our $AUTHORITY = 'cpan:STEVAN';
 
 requires 'pack';
 requires 'unpack';
@@ -21,7 +16,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;
 }