Uploaded image for project: 'Lucee Development'
  1. LDEV-1068

For Query Object, SerializeJSON function is not returning uppercase column names inside DATA struct.

    Details

    • Type: Bug
    • Status: Deployed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 5.1.1.30
    • Labels:
      None

      Description

      The SerializeJSON function with a serializeQueryByColumns parameter value of true for a Query object, is returning lowercase column names in the DATA struct.

      Example

      <cfscript>
          q1 = queryNew('name,age');
          queryAddRow( q1, ['Jim',40] );
          queryAddRow( q1, ['Bob',20] );
          queryAddRow( q1, ['Cooter',40] );
          
          j1 = serializeJSON(q1,true);
          writeDump(q1);
          writeoutput('<p>'& j1 & '</p>');
      </cfscript>
      
      {"ROWCOUNT":3,"COLUMNS":["NAME","AGE"],"DATA":{"name":["Jim","Bob","Cooter"],"age":[40,20,40]}} 

      However, in the Adobe Coldfusion this function returns uppercase column name:

       {"ROWCOUNT":3,"COLUMNS":["NAME","AGE"],"DATA":{"NAME":["Jim","Bob","Cooter"],"AGE":["40","20","40"]}} 

      We just migrate our adobe coldfusion site to lucee 5 and we start getting bunch of errors because of this.

        Attachments

          Issue links

            Activity

              People

              • Assignee:
                michaeloffner Michael Offner
                Reporter:
                Ronnie Ronnie Kumar
              • Votes:
                3 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: