Note that the way the code is written the gjson response will happily convert a value of "1234" to be 1234 when calling the Int() method. So, basically we want to derive the int value, ensure that it's not 0 and then explicitly call sjson.SetBytes to ensure that wof:id is an integer value.
Basically here:
https://github.com/whosonfirst/go-whosonfirst-export/blob/main/properties/wofid.go#L24-L27
Note that the way the code is written the
gjson
response will happily convert a value of "1234" to be 1234 when calling theInt()
method. So, basically we want to derive the int value, ensure that it's not 0 and then explicitly callsjson.SetBytes
to ensure thatwof:id
is an integer value.Background: https://github.com/whosonfirst-data/whosonfirst-data/issues/2208