如何将JSON放入数组中?

时间:2019-11-21 12:06:01

标签: arrays json vb.net api

我有一个问题。

我在变量中有一个JSON文本。

如何在字符串数组中做到这一点?

JSON查询: JSON-Query results

我的代码

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)

3 个答案:

答案 0 :(得分:2)

如果要使用JSON的不同部分,则可以构建一个模型来表示数据,然后反序列化为该模型。例如,您可以从提供的JSON生成模型:(有很多服务可以在线进行此操作)

    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

然后使用JSON.NET反序列化到这些模型中。首先,安装NuGet软件包Newtonsoft.Json,然后向其中添加导入:

Imports Newtonsoft.Json

然后反序列化:

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)

您现在可以使用模型访问JSON的每个部分。例如:

journey.connections.Count <-- gives you the number of connections (4 in your example)

稍微猜测一下数据,我相信这将为您提供第一次和最后一次连接的开始和结束日期/时间(即整个旅程):

journey.connections.First().from.departure
journey.connections.Last().to.arrival

答案 1 :(得分:1)

红色字段表示首次起飞时间(不是日期)

黄色字段表示首次到达时间(不是日期)

黑场表示第二次出发时间(不是日期)

绿色字段用于第二次到达时间(不是日期)

蓝色字段用于第三次出发时间(不是日期)

紫罗兰字段是第三次到达时间(不是日期)

就是我想要的。如何获取此数据?

My GUI

答案 2 :(得分:0)

我的整个字符串:

{"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}]}}