i'm suggesting a solution that can be very useful for the utilization of this API by developers.
i figured out that some fields changes name for every nationality, we have the "Zip" field and the " Social Security number " field that change name.
- zip field -
For all nationality it is named "zip" but for GB it is named "Postcode"
- Social Security number field -
here a the list of every nationality available now on the API
AU = PPS
DE = HETU
ES = DNI
FI = HETU
FR = INSEE
GB = NINO
IE = PPS
NL = BNS
US = SSN
the problem is when developpers will try to deserialize the json, the most common way to do this is to create a Model reprisenting the JsonObject and then deserialize the JsonString,
this is a model that works with US ( see the field SSN ) :
but if we change the nationality for exemple DE ( the field needs to be named HETU ) and if i use the same Model my application will crash,
Yes i can add some conditions, but i know that the API is growing and later some new nationalities will be added,
suggested solution :
Adding some naming standards, like this the API will still usefull for a long time, even with the intervention of hundreds of contributers around the world.
i propose :
1) change the name of the security number to "IDnumber"
2) we add a new field "IDnotation" that hold the diffrent naming variations.
3) we have to chose between "Zip" or "Postcode" and use it for all nationalities
i'm suggesting a solution that can be very useful for the utilization of this API by developers. i figured out that some fields changes name for every nationality, we have the "Zip" field and the " Social Security number " field that change name. - zip field - For all nationality it is named "zip" but for GB it is named "Postcode" - Social Security number field - here a the list of every nationality available now on the API AU = PPS DE = HETU ES = DNI FI = HETU FR = INSEE GB = NINO IE = PPS NL = BNS US = SSN
this is a model that works with US ( see the field SSN ) :
but if we change the nationality for exemple DE ( the field needs to be named HETU ) and if i use the same Model my application will crash, Yes i can add some conditions, but i know that the API is growing and later some new nationalities will be added,
i propose : 1) change the name of the security number to "IDnumber" 2) we add a new field "IDnotation" that hold the diffrent naming variations. 3) we have to chose between "Zip" or "Postcode" and use it for all nationalities