Situation: I am building a Web API that queries a database and then returns the results via JSON.
There are a couple of columns that are being introduced to the table, but do not have data populated in them yet. So their value is "NULL" for the time being. It wont always be this way, and some "legacy" data my contain the "NULL" value going forward.
When I get the JSON response that contains the "NULL" value it is empty.
({foo: , foo1: bar1})
So my question is what is the correct way to pass a "NULL" value back to the original caller? I can all ways check for "NULL" and then return an empty string or "-1" for integers, but I was wondering what the correct method is outside of not having a "NULL" in the first place.