Uploaded image for project: 'translate5'
  1. translate5
  2. TRANSLATE-1497

Convert JSON.parse calls to Ext.JSON.decode calls

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • translate5 - 3.0.0
    • None
    • None

    Description

      problem

      At several places in the Javascript we use JSON.parse instead of Ext.JSON.decode.

      If the parsed string is no valid JSON the error message of JSON.parse is
      Uncaught SyntaxError: Unexpected token < in JSON at position 0

      The error message of Ext.JSON.decode is instead:
      [E] Ext.JSON.decode(): You're trying to decode an invalid JSON String: <test>

      The latter is much more better for debugging.

      In general: avoid usage of plain JS methods if the frame provide the same stuff!

      Attachments

        Activity

          People

            aleksandar Aleksandar Mitrev
            tlauria Thomas Lauria
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: