Subject: | [PATCH] Some idiots changed the default behavior of JSON formatters |
--- t/23json.t.org 2014-09-12 08:45:33.401268362 +0200
It is *NOT* the responsibility of SQL::Translator to verify the style/layout/formatting of JSON
All it needs to know it that the *content* is valid
+++ t/23json.t 2014-09-12 08:46:32.040973724 +0200
@@ -301,4 +301,12 @@ my $tr = SQL::Translator->new(
my $out;
ok( $out = $tr->translate, 'Translate SQLite to JSON' );
+# Some idiots modify the default format of JSON
+# while it is still valid JSON, it is not the default
+for ($out, $json) {
+ s/ +/ /g;
+ s/^ +//mg;
+ s/\[ ]/[]/g;
+ s/[{] }/{}/g;
+}
eq_or_diff( $out, $json, 'JSON matches expected' );