Skip to content
This repository has been archived by the owner on Jul 24, 2021. It is now read-only.

postcode should be a string? #3520

Closed
openstreetmap-trac opened this issue Jul 23, 2021 · 1 comment
Closed

postcode should be a string? #3520

openstreetmap-trac opened this issue Jul 23, 2021 · 1 comment

Comments

@openstreetmap-trac
Copy link

Reporter: booo
[Submitted to the original trac issue database at 9.41pm, Sunday, 6th February 2011]

Request in question: http://nominatim.openstreetmap.org/reverse?format=json&osm_type=N&osm_id=524588214&addressdetails=0

JSON does not support integers with leading zeros. I'm not sure how complex postcodes could be. Perhaps the best way to fix the problem is to return a string. This could be done in javascript_renderData by removing the if statement with is_int. If we would like to parse ints and floats we should check for is_int and return (int) $xVal or (float) $xVal I guess.

Thx for your help.

@openstreetmap-trac
Copy link
Author

Author: lonvia
[Added to the original trac issue at 11.18pm, Tuesday, 13th November 2012]

All elements of the json response are now returned as strings.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant