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

isJSON and deserializeJSON accept invalid JSON

    Details

    • Type: Bug
    • Status: Deployed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 5.0.0.49, 4.5.1.022
    • Fix Version/s: 4.5.3.002
    • Labels:
      None

      Description

      The deserializeJSON and isJSON functions allow extra commas in arrays, for example: http://trycf.com/gist/f17b18b3c8805d3a051c/lucee

      Example Code:

      <cfscript>
      j = "[{""company"":""Foundeo"", ""name"":""Pete Freitag""} ,{""company"":""Foundeo"", ""name"":""Pete Freitag""}, ]"
      writeOutput("isJSON: " & isJSON(j));
      person = deserializeJSON(j);
      writeDump( person );
      </cfscript>
      

        Attachments

          Issue links

            Activity

              People

              • Assignee:
                michaeloffner Michael Offner
                Reporter:
                petefreitag Pete Freitag
              • Votes:
                4 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: