I have subscribed and use the realtime bus position feed in our application.
Few weeks ago, our application is not functioning and further investigation found that the JSON schema for the realtime bus position have been changes such as trip_id became tripId.
How could be the best way for us to get notified of these changes ahead of time such that we can make the corresponding changes in our application accordingly? Thanks!
Are you decoding the protobuf yourself? We have our recommended proto files on our documentation page, that way you will also get extra info such as the extended vehicle descriptor which I note is missing from your example.
Thanks for responding to my query!
The following is an extract of the converted JSON output from the feed, it was obtained back in November last year (and yes, we have written a Go program to convert the protobuf to JSON). Under the vehicle.trip, attribute trip id and route id were represented as trip_id and route_id respectively. However in the more recent feed, they were shown as tripId and routeId as shown in my initial post. Hence we are looking for the best way for us to be notified changes such as these. Thanks!
I have a second look of your sample JSON using the debug mode and noticed that it is the same as the one that I just posted that we used in our application i.e tip_id and route_id etc.
Are you aware of any renaming of attributes in the actual protobuf output such as renaming from trip_id to tripId etc?
debug=true does not provide json. it is a text version of protobuf. the protobuf spec contains the name of the field and not the data feed. if the field name has changed, then possibly your protobuf spec file has changed?
i see now that some feeds do have a format=json parameter and it is indeed now returning camelCase. i don’t use format=json so i can’t say if it has changed.
if both the Go package and api.transport.nsw.gov.au have changed, then it is likely google have changed their Go/Java bindings in their protobuf library/compiler to convert snake_case to camelCase. but it seems odd that both of you would have updated/recompiled at the same time without noticing the change.