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

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

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 2.4.5
    • 2.4.7
    • JSON
    • None
    • 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

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

            Dates

              Created:
              Updated:
              Resolved: