Open dtrillo opened 5 years ago
There is a new option, in order to not loose compatibility with previous versions, just creating a new function:
' Load properties from the first record of an ADO RecordSet object ' @param rs as ADODB.RecordSet public sub LoadFirstRecord2(byref rs, lcaseall) ' Change 3.8.2 dim field
for each field in rs.fields
k = field.name: if lcaseall then k = lcase(k)
add k, field.value
next
end sub
public sub LoadFirstRecord(byref rs)
LoadFirstRecord2 rs, false
end sub
Hi. I think this could be a property to set in the object and all parsing from it would use lowercase keys. What do you think?
Something like this:
<%
set json = New JSONObject
json.LowerCaseKeys = true ' hypothetical property
' from here on every key added would be in lowercase
' ...
%>
That would be great! So, you need to modify serializeObject, don't you? I think this option will reduce problems with the response, instead of working on the model of the database.
Hi. I wonder if if is possible to add a new parameter on functions LoadRecordset and LoadFirstRecord to allow that the key can be always lower case. I do like this:
public sub LoadFirstRecord(byref rs, lcaseall) ' Change 3.8.2 dim field