Uploaded image for project: 'Shindig'
  1. Shindig
  2. SHINDIG-1312

Bug in json_format in OutputJsonConverter.php

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.0.0-RC2
    • Component/s: PHP
    • Labels:
      None
    • Environment:
      All

      Description

      When a value in key/value pairs is a json string containing url,
      json_format adds a space after ":" sign in "http://" and this breaks the url.

      For example, I have the following object:
      entry: {
      p_2: {
      gadgets: [

      {"moduleId":"1","url":"http:\/\/www.labpixies.com\/campaigns\/todo\/todo.xml"}

      ,

      {"moduleId":"12","url":"http:\/\/localhost\/appdataget.xml"}

      ]
      }
      }

      In the output all the urls become broken because of the space in "http )\\\/\\\/ww..."
      { "entry": { "p_2": { "gadgets": "[

      {\"moduleId\":\"1\",\"url\":\"http: \\\/\\\/www.labpixies.com\\\/campaigns\\\/todo\\\/todo.xml\"}

      ,

      {\"moduleId\":\"12\",\"url\":\"http: \\\/\\\/localhost\\\/appdataget.xml\"}

      ]" } } }

      See the patch submitted.

        Attachments

        1. fix-1312-bug.patch
          0.5 kB
          Evgeny Bogdanov

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              vohtaski Evgeny Bogdanov
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: