You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.
The JSON output type (_output=application/json) returns everything as a string.
That makes sense for the XML output type, when everything is an attribute. But JSON supports number and boolean as well as string, so if a column is either of those, it should be output in that form.
The text was updated successfully, but these errors were encountered:
Right you are Sir. We could definitely drop the double quotes from boolean and numeric data types. That would avoid requiring consumers having to cast.
Right. One issue I can see is that it wouldn't be backward compatible, but since JSON was only added recently, I'm not sure how big a problem that is. I guess you could document it, or add some kind of switch to default it back.
The relevant section of code looks to be in restsql/src/org/restsql/core/impl/JsonResponseSerializer.java in appendNameValuePair. Changing
The JSON output type (_output=application/json) returns everything as a string.
That makes sense for the XML output type, when everything is an attribute. But JSON supports number and boolean as well as string, so if a column is either of those, it should be output in that form.
The text was updated successfully, but these errors were encountered: