summaryrefslogtreecommitdiff
path: root/bin/db-zugbildung-to-json
diff options
context:
space:
mode:
Diffstat (limited to 'bin/db-zugbildung-to-json')
-rwxr-xr-xbin/db-zugbildung-to-json8
1 files changed, 8 insertions, 0 deletions
diff --git a/bin/db-zugbildung-to-json b/bin/db-zugbildung-to-json
index c00b784..759f2f7 100755
--- a/bin/db-zugbildung-to-json
+++ b/bin/db-zugbildung-to-json
@@ -440,6 +440,14 @@ for my $train ( values %map ) {
end => $end,
postEnd => $post_end,
};
+
+ for my $k ( keys %{ $train->{route} } ) {
+ if ( not defined $train->{route}{$k} ) {
+
+ # avoid null values (leave out the property instead)
+ delete $train->{route}{$k};
+ }
+ }
}
for my $train ( values %map ) {