From de213f09e19af303c97bede3362654a8854aa1ed Mon Sep 17 00:00:00 2001 From: Birte Kristina Friesel Date: Sun, 12 Nov 2023 17:32:22 +0100 Subject: Location: Add TO_JSON function --- lib/Travel/Routing/DE/HAFAS/Location.pm | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/Travel/Routing/DE/HAFAS/Location.pm b/lib/Travel/Routing/DE/HAFAS/Location.pm index 27b9dd2..aef6a52 100644 --- a/lib/Travel/Routing/DE/HAFAS/Location.pm +++ b/lib/Travel/Routing/DE/HAFAS/Location.pm @@ -30,6 +30,14 @@ sub new { return $ref; } +sub TO_JSON { + my ($self) = @_; + + my $ret = { %{$self} }; + + return $ret; +} + 1; __END__ -- cgit v1.2.3