Opened 8 years ago

Closed 7 years ago

#3520 closed defect (fixed)

postcode should be a string?

Reported by: booo Owned by: geocoding@…
Priority: major Milestone:
Component: nominatim Version:
Keywords: reverse geocoding, json Cc:

Description

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.

Change History (2)

comment:1 Changed 7 years ago by Tom Hughes

Owner: changed from openstreetmap@… to geocoding@…

comment:2 Changed 7 years ago by Sarah Hoffmann

Resolution: fixed
Status: newclosed

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

Note: See TracTickets for help on using tickets.