I have a question.
I have an JSON-Text in a variable.
How can I do it in a string array?
JSON-Query:
JSON-Query results
My Code
Dim wc As New System.Net.WebClient
Dim s As String = wc.DownloadString("http://transport.opendata.ch/v1/connections?from=" & textBox1.Text & "&to=" & textBox2.Text)
If you are going to be using different parts of the JSON you could build a model to represent the data and then deserialize into that model. For instance, you can generate a model from the JSON provided: (there are a number of services to do this online)
Public Class Coordinate
Public Property type As String
Public Property x As Double
Public Property y As Double
End Class
Public Class Station
Public Property id As String
Public Property name As String
Public Property score As Object
Public Property coordinate As Coordinate
Public Property distance As Object
End Class
Public Class Prognosis
Public Property platform As Object
Public Property arrival As Object
Public Property departure As DateTime?
Public Property capacity1st As Object
Public Property capacity2nd As Object
End Class
Public Class Location
Public Property id As String
Public Property name As String
Public Property score As Object
Public Property coordinate As Coordinate
Public Property distance As Object
End Class
Public Class From
Public Property station As Station
Public Property arrival As Object
Public Property arrivalTimestamp As Object
Public Property departure As DateTime
Public Property departureTimestamp As Integer
Public Property delay As Integer?
Public Property platform As String
Public Property prognosis As Prognosis
Public Property realtimeAvailability As Object
Public Property location As Location
End Class
Public Class [To]
Public Property station As Station
Public Property arrival As DateTime
Public Property arrivalTimestamp As Integer
Public Property departure As Object
Public Property departureTimestamp As Object
Public Property delay As Object
Public Property platform As String
Public Property prognosis As Prognosis
Public Property realtimeAvailability As Object
Public Property location As Location
End Class
Public Class PassList
Public Property station As Station
Public Property arrival As DateTime?
Public Property arrivalTimestamp As Integer?
Public Property departure As DateTime?
Public Property departureTimestamp As Integer?
Public Property delay As Integer?
Public Property platform As String
Public Property prognosis As Prognosis
Public Property realtimeAvailability As Object
Public Property location As Location
End Class
Public Class Journey
Public Property name As String
Public Property category As String
Public Property subcategory As Object
Public Property categoryCode As Object
Public Property number As String
Public Property [operator] As String
Public Property [to] As String
Public Property passList As List(Of PassList)
Public Property capacity1st As Object
Public Property capacity2nd As Object
End Class
Public Class Departure
Public Property station As Station
Public Property arrival As Object
Public Property arrivalTimestamp As Object
Public Property departure As DateTime
Public Property departureTimestamp As Integer
Public Property delay As Integer?
Public Property platform As String
Public Property prognosis As Prognosis
Public Property realtimeAvailability As Object
Public Property location As Location
End Class
Public Class Arrival
Public Property station As Station
Public Property arrival As DateTime
Public Property arrivalTimestamp As Integer
Public Property departure As Object
Public Property departureTimestamp As Object
Public Property delay As Integer?
Public Property platform As String
Public Property prognosis As Prognosis
Public Property realtimeAvailability As Object
Public Property location As Location
End Class
Public Class Section
Public Property journey As Journey
Public Property walk As Object
Public Property departure As Departure
Public Property arrival As Arrival
End Class
Public Class Connection
Public Property from As From
Public Property [to] As [To]
Public Property duration As String
Public Property transfers As Integer
Public Property service As Object
Public Property products As List(Of String)
Public Property capacity1st As Object
Public Property capacity2nd As Object
Public Property sections As List(Of Section)
End Class
Public Class Stations
Public Property from As List(Of From)
Public Property [to] As List(Of [To])
End Class
Public Class RootObject
Public Property connections As List(Of Connection)
Public Property from As From
Public Property [to] As [To]
Public Property stations As Stations
End Class
And then deserialize using JSON.NET into these models. Firstly, install the NuGet package Newtonsoft.Json and then add an import to it:
Imports Newtonsoft.Json
Then deserialise:
Dim wc As New System.Net.WebClient
Dim s As String = wc.DownloadString("http://transport.opendata.ch/v1/connections?from=" & textBox1.Text & "&to=" & textBox2.Text)
Dim journey = JsonConvert.DeserializeObject(Of RootObject)(s)
You can now access every part of the JSON using the model. For instance:
journey.connections.Count <-- gives you the number of connections (4 in your example)
Guessing a bit at the data I believe this will give you start and end date/times of the first and last connection (i.e. the whole journey):
journey.connections.First().from.departure
journey.connections.Last().to.arrival
The red field is for first departure Time (Not Date)
The yellow field is for first arrival Time (Not Date)
The black field is for second departure Time (Not Date)
The green field is for second arrival Time (Not Date)
The blue field is for third departure Time (Not Date)
The violet field is for third arrival Time (Not Date)
That is, what I want. How can I get this Data?
My entire string:
{"connections":[{"from":{"station":{"id":"8505000","name":"Luzern","score":null,"coordinate":{"type":"WGS84","x":47.050165,"y":8.310172},"distance":null},"arrival":null,"arrivalTimestamp":null,"departure":"2019-11-21T14:27:00+0100","departureTimestamp":1574342820,"delay":0,"platform":"14","prognosis":{"platform":null,"arrival":null,"departure":"2019-11-21T14:27:00+0100","capacity1st":null,"capacity2nd":null},"realtimeAvailability":null,"location":{"id":"8505000","name":"Luzern","score":null,"coordinate":{"type":"WGS84","x":47.050165,"y":8.310172},"distance":null}},"to":{"station":{"id":"8508392","name":"Dallenwil","score":null,"coordinate":{"type":"WGS84","x":46.933766,"y":8.392058},"distance":null},"arrival":"2019-11-21T14:52:00+0100","arrivalTimestamp":1574344320,"departure":null,"departureTimestamp":null,"delay":null,"platform":"14","prognosis":{"platform":null,"arrival":null,"departure":null,"capacity1st":null,"capacity2nd":null},"realtimeAvailability":null,"location":{"id":"8508392","name":"Dallenwil","score":null,"coordinate":{"type":"WGS84","x":46.933766,"y":8.392058},"distance":null}},"duration":"00d00:25:00","transfers":0,"service":null,"products":["S4"],"capacity1st":null,"capacity2nd":null,"sections":[{"journey":{"name":"S4 21454","category":"S","subcategory":null,"categoryCode":null,"number":"4","operator":"ZB","to":"Wolfenschiessen","passList":[{"station":{"id":"8505000","name":"Luzern","score":null,"coordinate":{"type":"WGS84","x":47.050165,"y":8.310172},"distance":null},"arrival":null,"arrivalTimestamp":null,"departure":"2019-11-21T14:27:00+0100","departureTimestamp":1574342820,"delay":0,"platform":"14","prognosis":{"platform":null,"arrival":null,"departure":"2019-11-21T14:27:00+0100","capacity1st":null,"capacity2nd":null},"realtimeAvailability":null,"location":{"id":"8505000","name":"Luzern","score":null,"coordinate":{"type":"WGS84","x":47.050165,"y":8.310172},"distance":null}},{"station":{"id":"8508321","name":"Luzern Allmend\/Messe","score":null,"coordinate":{"type":"WGS84","x":47.035078,"y":8.303309},"distance":null},"arrival":"2019-11-21T14:29:00+0100","arrivalTimestamp":1574342940,"departure":"2019-11-21T14:29:00+0100","departureTimestamp":1574342940,"delay":1,"platform":null,"prognosis":{"platform":null,"arrival":null,"departure":"2019-11-21T14:30:00+0100","capacity1st":null,"capacity2nd":null},"realtimeAvailability":null,"location":{"id":"8508321","name":"Luzern Allmend\/Messe","score":null,"coordinate":{"type":"WGS84","x":47.035078,"y":8.303309},"distance":null}},{"station":{"id":"8516351","name":"Kriens Mattenhof","score":null,"coordinate":{"type":"WGS84","x":47.026602,"y":8.30237},"distance":null},"arrival":"2019-11-21T14:31:00+0100","arrivalTimestamp":1574343060,"departure":"2019-11-21T14:31:00+0100","departureTimestamp":1574343060,"delay":1,"platform":null,"prognosis":{"platform":null,"arrival":null,"departure":"2019-11-21T14:32:00+0100","capacity1st":null,"capacity2nd":null},"realtimeAvailability":null,"location":{"id":"8516351","name":"Kriens Mattenhof","score":null,"coordinate":{"type":"WGS84","x":47.026602,"y":8.30237},"distance":null}},{"station":{"id":"8508319","name":"Horw","score":null,"coordinate":{"type":"WGS84","x":47.017463,"y":8.306971},"distance":null},"arrival":"2019-11-21T14:33:00+0100","arrivalTimestamp":1574343180,"departure":"2019-11-21T14:33:00+0100","departureTimestamp":1574343180,"delay":1,"platform":null,"prognosis":{"platform":null,"arrival":null,"departure":"2019-11-21T14:34:00+0100","capacity1st":null,"capacity2nd":null},"realtimeAvailability":null,"location":{"id":"8508319","name":"Horw","score":null,"coordinate":{"type":"WGS84","x":47.017463,"y":8.306971},"distance":null}},{"station":{"id":"8508318","name":"Hergiswil","score":null,"coordinate":{"type":"WGS84","x":46.982608,"y":8.310167},"distance":null},"arrival":"2019-11-21T14:40:00+0100","arrivalTimestamp":1574343600,"departure":"2019-11-21T14:40:00+0100","departureTimestamp":1574343600,"delay":1,"platform":null,"prognosis":{"platform":null,"arrival":null,"departure":"2019-11-21T14:41:00+0100","capacity1st":null,"capacity2nd":null},"realtimeAvailability":null,"location":{"id":"8508318","name":"Hergiswil","score":null,"coordinate":{"type":"WGS84","x":46.982608,"y":8.310167},"distance":null}},{"station":{"id":"8508390","name":"Stansstad","score":null,"coordinate":{"type":"WGS84","x":46.976253,"y":8.336336},"distance":null},"arrival":"2019-11-21T14:44:00+0100","arrivalTimestamp":1574343840,"departure":"2019-11-21T14:44:00+0100","departureTimestamp":1574343840,"delay":0,"platform":null,"prognosis":{"platform":null,"arrival":null,"departure":"2019-11-21T14:44:00+0100","capacity1st":null,"capacity2nd":null},"realtimeAvailability":null,"location":{"id":"8508390","name":"Stansstad","score":null,"coordinate":{"type":"WGS84","x":46.976253,"y":8.336336},"distance":null}},{"station":{"id":"8508391","name":"Stans","score":null,"coordinate":{"type":"WGS84","x":46.958316,"y":8.366742},"distance":null},"arrival":"2019-11-21T14:48:00+0100","arrivalTimestamp":1574344080,"departure":"2019-11-21T14:48:00+0100","departureTimestamp":1574344080,"delay":0,"platform":null,"prognosis":{"platform":null,"arrival":null,"departure":"2019-11-21T14:48:00+0100","capacity1st":null,"capacity2nd":null},"realtimeAvailability":null,"location":{"id":"8508391","name":"Stans","score":null,"coordinate":{"type":"WGS84","x":46.958316,"y":8.366742},"distance":null}},{"station":{"id":"8508392","name":"Dallenwil","score":null,"coordinate":{"type":"WGS84","x":46.933766,"y":8.392058},"distance":null},"arrival":"2019-11-21T14:52:00+0100","arrivalTimestamp":1574344320,"departure":null,"departureTimestamp":null,"delay":0,"platform":"1","prognosis":{"platform":null,"arrival":"2019-11-21T14:52:00+0100","departure":null,"capacity1st":null,"capacity2nd":null},"realtimeAvailability":null,"location":{"id":"8508392","name":"Dallenwil","score":null,"coordinate":{"type":"WGS84","x":46.933766,"y":8.392058},"distance":null}}],"capacity1st":null,"capacity2nd":null},"walk":null,"departure":{"station":{"id":"8505000","name":"Luzern","score":null,"coordinate":{"type":"WGS84","x":47.050165,"y":8.310172},"distance":null},"arrival":null,"arrivalTimestamp":null,"departure":"2019-11-21T14:27:00+0100","departureTimestamp":1574342820,"delay":0,"platform":"14","prognosis":{"platform":null,"arrival":null,"departure":"2019-11-21T14:27:00+0100","capacity1st":null,"capacity2nd":null},"realtimeAvailability":null,"location":{"id":"8505000","name":"Luzern","score":null,"coordinate":{"type":"WGS84","x":47.050165,"y":8.310172},"distance":null}},"arrival":{"station":{"id":"8508392","name":"Dallenwil","score":null,"coordinate":{"type":"WGS84","x":46.933766,"y":8.392058},"distance":null},"arrival":"2019-11-21T14:52:00+0100","arrivalTimestamp":1574344320,"departure":null,"departureTimestamp":null,"delay":0,"platform":"1","prognosis":{"platform":null,"arrival":"2019-11-21T14:52:00+0100","departure":null,"capacity1st":null,"capacity2nd":null},"realtimeAvailability":null,"location":{"id":"8508392","name":"Dallenwil","score":null,"coordinate":{"type":"WGS84","x":46.933766,"y":8.392058},"distance":null}}}]},{"from":{"station":{"id":"8505000","name":"Luzern","score":null,"coordinate":{"type":"WGS84","x":47.050165,"y":8.310172},"distance":null},"arrival":null,"arrivalTimestamp":null,"departure":"2019-11-21T15:10:00+0100","departureTimestamp":1574345400,"delay":null,"platform":"13","prognosis":{"platform":null,"arrival":null,"departure":null,"capacity1st":null,"capacity2nd":null},"realtimeAvailability":null,"location":{"id":"8505000","name":"Luzern","score":null,"coordinate":{"type":"WGS84","x":47.050165,"y":8.310172},"distance":null}},"to":{"station":{"id":"8508392","name":"Dallenwil","score":null,"coordinate":{"type":"WGS84","x":46.933766,"y":8.392058},"distance":null},"arrival":"2019-11-21T15:29:00+0100","arrivalTimestamp":1574346540,"departure":null,"departureTimestamp":null,"delay":null,"platform":"13","prognosis":{"platform":null,"arrival":null,"departure":null,"capacity1st":null,"capacity2nd":null},"realtimeAvailability":null,"location":{"id":"8508392","name":"Dallenwil","score":null,"coordinate":{"type":"WGS84","x":46.933766,"y":8.392058},"distance":null}},"duration":"00d00:19:00","transfers":0,"service":null,"products":["IR"],"capacity1st":null,"capacity2nd":null,"sections":[{"journey":{"name":"IR 2976","category":"IR","subcategory":null,"categoryCode":null,"number":"IR 2976","operator":"ZB","to":"Engelberg","passList":[{"station":{"id":"8505000","name":"Luzern","score":null,"coordinate":{"type":"WGS84","x":47.050165,"y":8.310172},"distance":null},"arrival":null,"arrivalTimestamp":null,"departure":"2019-11-21T15:10:00+0100","departureTimestamp":1574345400,"delay":null,"platform":"13","prognosis":{"platform":null,"arrival":null,"departure":null,"capacity1st":null,"capacity2nd":null},"realtimeAvailability":null,"location":{"id":"8505000","name":"Luzern","score":null,"coordinate":{"type":"WGS84","x":47.050165,"y":8.310172},"distance":null}},{"station":{"id":"8508391","name":"Stans","score":null,"coordinate":{"type":"WGS84","x":46.958316,"y":8.366742},"distance":null},"arrival":"2019-11-21T15:23:00+0100","arrivalTimestamp":1574346180,"departure":"2019-11-21T15:24:00+0100","departureTimestamp":1574346240,"delay":null,"platform":null,"prognosis":{"platform":null,"arrival":null,"departure":null,"capacity1st":null,"capacity2nd":null},"realtimeAvailability":null,"location":{"id":"8508391","name":"Stans","score":null,"coordinate":{"type":"WGS84","x":46.958316,"y":8.366742},"distance":null}},{"station":{"id":"8508392","name":"Dallenwil","score":null,"coordinate":{"type":"WGS84","x":46.933766,"y":8.392058},"distance":null},"arrival":"2019-11-21T15:29:00+0100","arrivalTimestamp":1574346540,"departure":null,"departureTimestamp":null,"delay":null,"platform":"2","prognosis":{"platform":null,"arrival":null,"departure":null,"capacity1st":null,"capacity2nd":null},"realtimeAvailability":null,"location":{"id":"8508392","name":"Dallenwil","score":null,"coordinate":{"type":"WGS84","x":46.933766,"y":8.392058},"distance":null}}],"capacity1st":null,"capacity2nd":null},"walk":null,"departure":{"station":{"id":"8505000","name":"Luzern","score":null,"coordinate":{"type":"WGS84","x":47.050165,"y":8.310172},"distance":null},"arrival":null,"arrivalTimestamp":null,"departure":"2019-11-21T15:10:00+0100","departureTimestamp":1574345400,"delay":null,"platform":"13","prognosis":{"platform":null,"arrival":null,"departure":null,"capacity1st":null,"capacity2nd":null},"realtimeAvailability":null,"location":{"id":"8505000","name":"Luzern","score":null,"coordinate":{"type":"WGS84","x":47.050165,"y":8.310172},"distance":null}},"arrival":{"station":{"id":"8508392","name":"Dallenwil","score":null,"coordinate":{"type":"WGS84","x":46.933766,"y":8.392058},"distance":null},"arrival":"2019-11-21T15:29:00+0100","arrivalTimestamp":1574346540,"departure":null,"departureTimestamp":null,"delay":null,"platform":"2","prognosis":{"platform":null,"arrival":null,"departure":null,"capacity1st":null,"capacity2nd":null},"realtimeAvailability":null,"location":{"id":"8508392","name":"Dallenwil","score":null,"coordinate":{"type":"WGS84","x":46.933766,"y":8.392058},"distance":null}}}]},{"from":{"station":{"id":"8505000","name":"Luzern","score":null,"coordinate":{"type":"WGS84","x":47.050165,"y":8.310172},"distance":null},"arrival":null,"arrivalTimestamp":null,"departure":"2019-11-21T15:27:00+0100","departureTimestamp":1574346420,"delay":null,"platform":"14","prognosis":{"platform":null,"arrival":null,"departure":null,"capacity1st":null,"capacity2nd":null},"realtimeAvailability":null,"location":{"id":"8505000","name":"Luzern","score":null,"coordinate":{"type":"WGS84","x":47.050165,"y":8.310172},"distance":null}},"to":{"station":{"id":"8508392","name":"Dallenwil","score":null,"coordinate":{"type":"WGS84","x":46.933766,"y":8.392058},"distance":null},"arrival":"2019-11-21T15:52:00+0100","arrivalTimestamp":1574347920,"departure":null,"departureTimestamp":null,"delay":null,"platform":"14","prognosis":{"platform":null,"arrival":null,"departure":null,"capacity1st":null,"capacity2nd":null},"realtimeAvailability":null,"location":{"id":"8508392","name":"Dallenwil","score":null,"coordinate":{"type":"WGS84","x":46.933766,"y":8.392058},"distance":null}},"duration":"00d00:25:00","transfers":0,"service":null,"products":["S4"],"capacity1st":null,"capacity2nd":null,"sections":[{"journey":{"name":"S4 21458","category":"S","subcategory":null,"categoryCode":null,"number":"4","operator":"ZB","to":"Wolfenschiessen","passList":[{"station":{"id":"8505000","name":"Luzern","score":null,"coordinate":{"type":"WGS84","x":47.050165,"y":8.310172},"distance":null},"arrival":null,"arrivalTimestamp":null,"departure":"2019-11-21T15:27:00+0100","departureTimestamp":1574346420,"delay":null,"platform":"14","prognosis":{"platform":null,"arrival":null,"departure":null,"capacity1st":null,"capacity2nd":null},"realtimeAvailability":null,"location":{"id":"8505000","name":"Luzern","score":null,"coordinate":{"type":"WGS84","x":47.050165,"y":8.310172},"distance":null}},{"station":{"id":"8508321","name":"Luzern Allmend\/Messe","score":null,"coordinate":{"type":"WGS84","x":47.035078,"y":8.303309},"distance":null},"arrival":"2019-11-21T15:29:00+0100","arrivalTimestamp":1574346540,"departure":"2019-11-21T15:29:00+0100","departureTimestamp":1574346540,"delay":null,"platform":null,"prognosis":{"platform":null,"arrival":null,"departure":null,"capacity1st":null,"capacity2nd":null},"realtimeAvailability":null,"location":{"id":"8508321","name":"Luzern Allmend\/Messe","score":null,"coordinate":{"type":"WGS84","x":47.035078,"y":8.303309},"distance":null}},{"station":{"id":"8516351","name":"Kriens Mattenhof","score":null,"coordinate":{"type":"WGS84","x":47.026602,"y":8.30237},"distance":null},"arrival":"2019-11-21T15:31:00+0100","arrivalTimestamp":1574346660,"departure":"2019-11-21T15:31:00+0100","departureTimestamp":1574346660,"delay":null,"platform":null,"prognosis":{"platform":null,"arrival":null,"departure":null,"capacity1st":null,"capacity2nd":null},"realtimeAvailability":null,"location":{"id":"8516351","name":"Kriens Mattenhof","score":null,"coordinate":{"type":"WGS84","x":47.026602,"y":8.30237},"distance":null}},{"station":{"id":"8508319","name":"Horw","score":null,"coordinate":{"type":"WGS84","x":47.017463,"y":8.306971},"distance":null},"arrival":"2019-11-21T15:33:00+0100","arrivalTimestamp":1574346780,"departure":"2019-11-21T15:33:00+0100","departureTimestamp":1574346780,"delay":null,"platform":null,"prognosis":{"platform":null,"arrival":null,"departure":null,"capacity1st":null,"capacity2nd":null},"realtimeAvailability":null,"location":{"id":"8508319","name":"Horw","score":null,"coordinate":{"type":"WGS84","x":47.017463,"y":8.306971},"distance":null}},{"station":{"id":"8508318","name":"Hergiswil","score":null,"coordinate":{"type":"WGS84","x":46.982608,"y":8.310167},"distance":null},"arrival":"2019-11-21T15:40:00+0100","arrivalTimestamp":1574347200,"departure":"2019-11-21T15:40:00+0100","departureTimestamp":1574347200,"delay":null,"platform":null,"prognosis":{"platform":null,"arrival":null,"departure":null,"capacity1st":null,"capacity2nd":null},"realtimeAvailability":null,"location":{"id":"8508318","name":"Hergiswil","score":null,"coordinate":{"type":"WGS84","x":46.982608,"y":8.310167},"distance":null}},{"station":{"id":"8508390","name":"Stansstad","score":null,"coordinate":{"type":"WGS84","x":46.976253,"y":8.336336},"distance":null},"arrival":"2019-11-21T15:44:00+0100","arrivalTimestamp":1574347440,"departure":"2019-11-21T15:44:00+0100","departureTimestamp":1574347440,"delay":null,"platform":null,"prognosis":{"platform":null,"arrival":null,"departure":null,"capacity1st":null,"capacity2nd":null},"realtimeAvailability":null,"location":{"id":"8508390","name":"Stansstad","score":null,"coordinate":{"type":"WGS84","x":46.976253,"y":8.336336},"distance":null}},{"station":{"id":"8508391","name":"Stans","score":null,"coordinate":{"type":"WGS84","x":46.958316,"y":8.366742},"distance":null},"arrival":"2019-11-21T15:48:00+0100","arrivalTimestamp":1574347680,"departure":"2019-11-21T15:48:00+0100","departureTimestamp":1574347680,"delay":null,"platform":null,"prognosis":{"platform":null,"arrival":null,"departure":null,"capacity1st":null,"capacity2nd":null},"realtimeAvailability":null,"location":{"id":"8508391","name":"Stans","score":null,"coordinate":{"type":"WGS84","x":46.958316,"y":8.366742},"distance":null}},{"station":{"id":"8508392","name":"Dallenwil","score":null,"coordinate":{"type":"WGS84","x":46.933766,"y":8.392058},"distance":null},"arrival":"2019-11-21T15:52:00+0100","arrivalTimestamp":1574347920,"departure":null,"departureTimestamp":null,"delay":null,"platform":"1","prognosis":{"platform":null,"arrival":null,"departure":null,"capacity1st":null,"capacity2nd":null},"realtimeAvailability":null,"location":{"id":"8508392","name":"Dallenwil","score":null,"coordinate":{"type":"WGS84","x":46.933766,"y":8.392058},"distance":null}}],"capacity1st":null,"capacity2nd":null},"walk":null,"departure":{"station":{"id":"8505000","name":"Luzern","score":null,"coordinate":{"type":"WGS84","x":47.050165,"y":8.310172},"distance":null},"arrival":null,"arrivalTimestamp":null,"departure":"2019-11-21T15:27:00+0100","departureTimestamp":1574346420,"delay":null,"platform":"14","prognosis":{"platform":null,"arrival":null,"departure":null,"capacity1st":null,"capacity2nd":null},"realtimeAvailability":null,"location":{"id":"8505000","name":"Luzern","score":null,"coordinate":{"type":"WGS84","x":47.050165,"y":8.310172},"distance":null}},"arrival":{"station":{"id":"8508392","name":"Dallenwil","score":null,"coordinate":{"type":"WGS84","x":46.933766,"y":8.392058},"distance":null},"arrival":"2019-11-21T15:52:00+0100","arrivalTimestamp":1574347920,"departure":null,"departureTimestamp":null,"delay":null,"platform":"1","prognosis":{"platform":null,"arrival":null,"departure":null,"capacity1st":null,"capacity2nd":null},"realtimeAvailability":null,"location":{"id":"8508392","name":"Dallenwil","score":null,"coordinate":{"type":"WGS84","x":46.933766,"y":8.392058},"distance":null}}}]},{"from":{"station":{"id":"8505000","name":"Luzern","score":null,"coordinate":{"type":"WGS84","x":47.050165,"y":8.310172},"distance":null},"arrival":null,"arrivalTimestamp":null,"departure":"2019-11-21T16:10:00+0100","departureTimestamp":1574349000,"delay":null,"platform":"13","prognosis":{"platform":null,"arrival":null,"departure":null,"capacity1st":null,"capacity2nd":null},"realtimeAvailability":null,"location":{"id":"8505000","name":"Luzern","score":null,"coordinate":{"type":"WGS84","x":47.050165,"y":8.310172},"distance":null}},"to":{"station":{"id":"8508392","name":"Dallenwil","score":null,"coordinate":{"type":"WGS84","x":46.933766,"y":8.392058},"distance":null},"arrival":"2019-11-21T16:29:00+0100","arrivalTimestamp":1574350140,"departure":null,"departureTimestamp":null,"delay":null,"platform":"13","prognosis":{"platform":null,"arrival":null,"departure":null,"capacity1st":null,"capacity2nd":null},"realtimeAvailability":null,"location":{"id":"8508392","name":"Dallenwil","score":null,"coordinate":{"type":"WGS84","x":46.933766,"y":8.392058},"distance":null}},"duration":"00d00:19:00","transfers":0,"service":null,"products":["IR"],"capacity1st":null,"capacity2nd":null,"sections":[{"journey":{"name":"IR 2978","category":"IR","subcategory":null,"categoryCode":null,"number":"IR 2978","operator":"ZB","to":"Engelberg","passList":[{"station":{"id":"8505000","name":"Luzern","score":null,"coordinate":{"type":"WGS84","x":47.050165,"y":8.310172},"distance":null},"arrival":null,"arrivalTimestamp":null,"departure":"2019-11-21T16:10:00+0100","departureTimestamp":1574349000,"delay":null,"platform":"13","prognosis":{"platform":null,"arrival":null,"departure":null,"capacity1st":null,"capacity2nd":null},"realtimeAvailability":null,"location":{"id":"8505000","name":"Luzern","score":null,"coordinate":{"type":"WGS84","x":47.050165,"y":8.310172},"distance":null}},{"station":{"id":"8508391","name":"Stans","score":null,"coordinate":{"type":"WGS84","x":46.958316,"y":8.366742},"distance":null},"arrival":"2019-11-21T16:23:00+0100","arrivalTimestamp":1574349780,"departure":"2019-11-21T16:24:00+0100","departureTimestamp":1574349840,"delay":null,"platform":null,"prognosis":{"platform":null,"arrival":null,"departure":null,"capacity1st":null,"capacity2nd":null},"realtimeAvailability":null,"location":{"id":"8508391","name":"Stans","score":null,"coordinate":{"type":"WGS84","x":46.958316,"y":8.366742},"distance":null}},{"station":{"id":"8508392","name":"Dallenwil","score":null,"coordinate":{"type":"WGS84","x":46.933766,"y":8.392058},"distance":null},"arrival":"2019-11-21T16:29:00+0100","arrivalTimestamp":1574350140,"departure":null,"departureTimestamp":null,"delay":null,"platform":"2","prognosis":{"platform":null,"arrival":null,"departure":null,"capacity1st":null,"capacity2nd":null},"realtimeAvailability":null,"location":{"id":"8508392","name":"Dallenwil","score":null,"coordinate":{"type":"WGS84","x":46.933766,"y":8.392058},"distance":null}}],"capacity1st":null,"capacity2nd":null},"walk":null,"departure":{"station":{"id":"8505000","name":"Luzern","score":null,"coordinate":{"type":"WGS84","x":47.050165,"y":8.310172},"distance":null},"arrival":null,"arrivalTimestamp":null,"departure":"2019-11-21T16:10:00+0100","departureTimestamp":1574349000,"delay":null,"platform":"13","prognosis":{"platform":null,"arrival":null,"departure":null,"capacity1st":null,"capacity2nd":null},"realtimeAvailability":null,"location":{"id":"8505000","name":"Luzern","score":null,"coordinate":{"type":"WGS84","x":47.050165,"y":8.310172},"distance":null}},"arrival":{"station":{"id":"8508392","name":"Dallenwil","score":null,"coordinate":{"type":"WGS84","x":46.933766,"y":8.392058},"distance":null},"arrival":"2019-11-21T16:29:00+0100","arrivalTimestamp":1574350140,"departure":null,"departureTimestamp":null,"delay":null,"platform":"2","prognosis":{"platform":null,"arrival":null,"departure":null,"capacity1st":null,"capacity2nd":null},"realtimeAvailability":null,"location":{"id":"8508392","name":"Dallenwil","score":null,"coordinate":{"type":"WGS84","x":46.933766,"y":8.392058},"distance":null}}}]}],"from":{"id":"8505000","name":"Luzern","score":null,"coordinate":{"type":"WGS84","x":47.050165,"y":8.310172},"distance":null},"to":{"id":"8508392","name":"Dallenwil","score":null,"coordinate":{"type":"WGS84","x":46.933766,"y":8.392058},"distance":null},"stations":{"from":[{"id":"8505000","name":"Luzern","score":null,"coordinate":{"type":"WGS84","x":47.050165,"y":8.310172},"distance":null}],"to":[{"id":"8508392","name":"Dallenwil","score":null,"coordinate":{"type":"WGS84","x":46.933766,"y":8.392058},"distance":null}]}}