use JSON::PP instead for test
Dan Book [Sat, 7 Nov 2015 05:37:37 +0000 (00:37 -0500)]
Build.PL
META.json
cpanfile
t/collection.t

index 95b08cb..8291946 100644 (file)
--- a/Build.PL
+++ b/Build.PL
@@ -91,7 +91,7 @@ EOW
       },
       "test_requires" => {
         "Encode" => 0,
-        "JSON::Tiny" => "0.41",
+        "JSON::PP" => 0,
         "Test::More" => "0.88"
       }
     );
@@ -99,7 +99,7 @@ EOW
 
     my %fallback_build_requires = (
       "Encode" => 0,
-      "JSON::Tiny" => "0.41",
+      "JSON::PP" => 0,
       "Test::More" => "0.88"
     );
 
index 54fb65a..2ddf603 100644 (file)
--- a/META.json
+++ b/META.json
@@ -49,7 +49,7 @@
       "test" : {
          "requires" : {
             "Encode" : "0",
-            "JSON::Tiny" : "0.41",
+            "JSON::PP" : "0",
             "Test::More" : "0.88"
          }
       }
index fdecdae..f5d9461 100644 (file)
--- a/cpanfile
+++ b/cpanfile
@@ -5,5 +5,5 @@ requires 'Exporter';
 requires 'List::Util';
 requires 'Scalar::Util';
 test_requires 'Encode';
-test_requires 'JSON::Tiny' => '0.41';
+test_requires 'JSON::PP';
 test_requires 'Test::More' => '0.88';
index 91f36b0..a98eba2 100644 (file)
@@ -2,7 +2,7 @@ use strict;
 use warnings;
 use Test::More;
 use DOM::Tiny::Collection 'c';
-use JSON::Tiny 'encode_json';
+use JSON::PP ();
 
 # Array
 is c(1, 2, 3)->[1], 2, 'right result';
@@ -166,6 +166,6 @@ is_deeply $collection->uniq(join => ',')->flatten->to_array, [1, 2, 2, 1],
   'right result';
 
 # TO_JSON
-is encode_json(c(1, 2, 3)), '[1,2,3]', 'right result';
+is +JSON::PP->new->convert_blessed->encode(c(1, 2, 3)), '[1,2,3]', 'right result';
 
 done_testing();