From 0c6b8879c3c91bb2708e0f03f7d1641f760a6624 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Wed, 18 Sep 2013 21:17:56 +0200 Subject: Add Line->key and JSON export --- lib/Travel/Status/DE/VRR/Line.pm | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'lib/Travel/Status/DE/VRR/Line.pm') diff --git a/lib/Travel/Status/DE/VRR/Line.pm b/lib/Travel/Status/DE/VRR/Line.pm index 9f7b228..5c12980 100644 --- a/lib/Travel/Status/DE/VRR/Line.pm +++ b/lib/Travel/Status/DE/VRR/Line.pm @@ -18,6 +18,13 @@ sub new { return bless( $ref, $obj ); } + +sub TO_JSON { + my ($self) = @_; + + return { %{$self} }; +} + 1; __END__ -- cgit v1.2.3