Open NickATC opened 2 years ago
Hi, everyone. I also caught such behavior.
For a request like https://randomuser.me/api/?page=1&results=20&seed=abc
the response will contain users with postcodes with either Int
or String
values, for example: 99553 or "7044 TR".
Seems to be a bug or some misconception as the "Results" section in the format description provides an example, where postcode is shown as a String
value:
It would be nice if this inconsistency will be resolved as otherwise it forces client side to make extra moves for correct deserialization.
Also, an API description regarding which values might be provided in the fields (especially if the null
is permissible) is much appreciated.
According to documentation the POSTCODE value is a string, but sometimes the API response returns the POSTCODE value as an Integer.
Not sure if error or if I am missing something.