govitia / navitia

A client library in Go for the Navitia API (navitia.io) (v2 WIP)
The Unlicense
6 stars 2 forks source link

types: `PhysicalModes` and `GeoJSON` of Route struct seems to be not unmarshalled by Unmarshaller #22

Open nicolasdscp opened 3 years ago

nicolasdscp commented 3 years ago

In struct Route ;

type Route struct {
    ID            ID             `json:"id"`             // Identifier of the route, eg: "route:RAT:M6"
    Name          string         `json:"name"`           // Name of the route
    Frequence     bool           `json:"is_frequence"`   // If the route has frequency or not. Can only be “False”, but may be “True” in the future
    Line          Line           `json:"line"`           // Line is the line it is connected to
    Direction     Container      `json:"direction"`      // Direction is the direction of the route (Place or POI)
    PhysicalModes []PhysicalMode `json:"physical_modes"` // PhysicalModes of the line
    GeoJSON       GeoJSON        `json:"geo_json"`
}

According to the following JSON struct:

type jsonRoute struct {
    ID        *ID        `json:"id"`
    Name      *string    `json:"name"`
    Line      *Line      `json:"line"`
    Direction *Container `json:"direction"`

    // Value to process
    Frequence string `json:"is_frequence"`
}

PhysicalModes and GeoJSON of Route struct seems to be ignored when unmarshalling process ?!