Uploaded image for project: 'Tools (JBoss Tools)'
  1. Tools (JBoss Tools)
  2. JBIDE-9748

Openshift service: JSonSanitizer should be able to handle valid json objects with escaped quotes

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 3.3.0.M4
    • 3.3.0.M4
    • openshift
    • None

      The JSonSanitzer currently is in place to 'sanitize' invalid json that is being responded by the openshift service. It corrects erroneously quotes json objects with escaped quotes in it:

      ... 
      "aJsonObjectHere": "{ 
         \"aNestedProperty\" : \"withAStringValue\"
      }" 
      ...
      

      *This sanitizer should be able to handle valid and invalid json since openshift could fix their bug after we release our plugins. *

      The current implementation would most likely sanitize string values erroneously, if they have escaped quotes in the value:

      "aStringValueWithA\"Quote"
      

      The above value would get transformed into an invalid value if the json object would be reported in a valid way (aka not quoted and the quotes in it not escaped):

      ... 
      "aJsonObjectHere": { 
         "aNestedProperty" : "withAStringValueWithA\"Quote"
      } 
      

      The above would become:

      ... 
      "aJsonObjectHere": { 
         "aNestedProperty" : "withAStringValueWithA"Quote"
      } 
      

              adietish@redhat.com André Dietisheim
              adietish@redhat.com André Dietisheim
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved: