From b27d67d4894bfb6318efd6b11f35142f55c12b4d Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Mon, 17 Oct 2022 09:50:39 +0200 Subject: Message: Add TO_JSON method --- lib/Travel/Status/DE/HAFAS/Message.pm | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'lib/Travel') diff --git a/lib/Travel/Status/DE/HAFAS/Message.pm b/lib/Travel/Status/DE/HAFAS/Message.pm index bfbf0ba..0082cf8 100644 --- a/lib/Travel/Status/DE/HAFAS/Message.pm +++ b/lib/Travel/Status/DE/HAFAS/Message.pm @@ -20,6 +20,12 @@ sub new { return $ref; } +sub TO_JSON { + my ($self) = @_; + + return { %{$self} }; +} + 1; __END__ -- cgit v1.2.3