From: Tara L Andrews Date: Fri, 17 Feb 2012 14:07:19 +0000 (+0100) Subject: add JSON serialization method X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=2acf0892d2cfca8036e2208e4f83d0404d761695;p=scpubgit%2Fstemmatology.git add JSON serialization method --- diff --git a/lib/Text/Tradition/Collation/Reading.pm b/lib/Text/Tradition/Collation/Reading.pm index d1c69f7..7a99102 100644 --- a/lib/Text/Tradition/Collation/Reading.pm +++ b/lib/Text/Tradition/Collation/Reading.pm @@ -226,6 +226,11 @@ sub _stringify { return $self->id; } +sub TO_JSON { + my $self = shift; + return $self->text; +} + no Moose; __PACKAGE__->meta->make_immutable;