add JSON serialization method
Tara L Andrews [Fri, 17 Feb 2012 14:07:19 +0000 (15:07 +0100)]
lib/Text/Tradition/Collation/Reading.pm

index d1c69f7..7a99102 100644 (file)
@@ -226,6 +226,11 @@ sub _stringify {
        return $self->id;
 }
 
+sub TO_JSON {
+       my $self = shift;
+       return $self->text;
+}
+
 no Moose;
 __PACKAGE__->meta->make_immutable;