I have defined a field called Postcode and set the type text. When I enter postcode 85221 and save the collection even though this field defined as text api converts it to int inside the json. Is this expacted behaviour? How can I force api to return this value as string.
I looked into the database and it happens on save. So it’s not an output problem.
Just tested with commenting out these two lines:
Now int values are stored as strings and the api output is string, too. But I don’t understand why the checks are there. //JSON_NUMERIC_CHECK - without destroying values with leading zeros sounds important.
@artur Can you explain, why the check was there? It looked important and it looked like you wrote the MongoLite class yourself in the past. I just want to understand the reason, if something else could break in the future or if other related issues come up in the future.