Remove omitempty from boolean values

This commit is contained in:
Fred Boniface 2024-04-08 20:31:04 +01:00
parent 8ba2a306a5
commit 4719be9c13

View File

@ -9,7 +9,7 @@ type Stop struct {
WttDeparture string `json:"wttDeparture,omitempty"`
PublicArrival string `json:"publicArrival,omitempty"`
WttArrival string `json:"wttArrival,omitempty"`
IsPublic bool `json:"isPublic,omitempty"`
IsPublic bool `json:"isPublic"` // Ensure omitempty is not set
Tiploc string `json:"tiploc,omitempty"`
Pass string `json:"pass,omitempty"`
Platform string `json:"platform,omitempty"`
@ -28,9 +28,9 @@ type Service struct { // Consider including catering, train class etc. here too.
PlanSpeed int32 `json:"planSpeed,omitempty"`
ScheduleStartDate time.Time `json:"scheduleStartDate,omitempty"`
ScheduleEndDate time.Time `json:"scheduleEndDate,omitempty"`
FirstClass bool `json:"firstClass,omitempty"`
Catering bool `json:"catering,omitempty"`
Sleeper bool `json:"sleeper,omitempty"`
FirstClass bool `json:"firstClass"` // Ensure omitempty is not set
Catering bool `json:"catering"` // Ensure omitempty is not set
Sleeper bool `json:"sleeper"` // Ensure omitempty is not set
DaysRun []string `json:"daysRun,omitempty"`
Stops []Stop `json:"stops,omitempty"`
}