Uploaded image for project: 'Groovy'
  1. Groovy
  2. GROOVY-7728

LAX parser: Commenting out key/val pairs doesn't work

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.4.5
    • Fix Version/s: 2.4.7
    • Component/s: JSON
    • Labels:
      None
    • Environment:
      Linux OpenJDK 7 (java version "1.7.0_91")

      Description

      This is in regards to JsonParserType.LAX. I'm calling it with this code:

      def slurpOpts = new JsonSlurper().setType(JsonParserType.LAX).parse(new File(ConfigFileName))
      
      slurpOpts.each {k, v -> myOpts.put(k, slurpOpts.get(k))}
      

      Here is my JSON. appUserId is parsed but it should be commented out. The key baseFolderName is correctly commented out.

      {
          "enterpriseDomain": "@example.com"
          ,"enterpriseId": "123456"
          ,"clientId": "abcdefghijklmnopqrstuvwxyz123456"
          ,"clientSecret": "abcdefghijklmnopqrstuvwxyz123456"
          ,"keyId": "12345678"
          ,"keyFileName": "/etc/PrintToBox/PrintToBox_private_key.pem"
          ,"keyPassword": "12345678901234567890"
          // ,"appUserId": "123456789" 
      
          //  Optional parameters with defaults shown
          // ,"baseFolderName": "PrintToBox"
      }
      

        Attachments

          Activity

            People

            • Assignee:
              jwagenleitner John Wagenleitner
              Reporter:
              luyseyal Stephen Olander-Waters
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: