Include field serialization in versioned json output
Change-Id: Ib48d28af2eaac4e550727f838903ebb0cf15bb74
diff --git a/t/meta_koral.t b/t/meta_koral.t
index 931f106..1de378d 100644
--- a/t/meta_koral.t
+++ b/t/meta_koral.t
@@ -47,8 +47,6 @@
_contains_not($fields, 'textDomain');
_contains_not($fields, 'keywords');
-# diag Dumper $fields;
-
_contains_not($fields, 'subTitle');
diff --git a/t/tokenization.t b/t/tokenization.t
index 4c4ddaa..4e883d1 100644
--- a/t/tokenization.t
+++ b/t/tokenization.t
@@ -60,6 +60,16 @@
like($tokens->stream->pos(14)->to_string, qr/s:Der/);
+my $json = decode_json $tokens->to_json;
+is($json->{docSigle}, 'WPD/AAA', 'DocSigle old');
+is($json->{author}, 'Ruru; Jens.Ol; Aglarech; u.a.', 'author old');
+
+$json = decode_json $tokens->to_json(0.4);
+is($json->{fields}->[0]->{key}, 'corpusSigle');
+is($json->{fields}->[0]->{value}, 'WPD');
+is($json->{fields}->[6]->{key}, 'creationDate');
+is($json->{fields}->[6]->{value}, '2005');
+
done_testing;
__END__