Uploaded image for project: 'CFEngine Community'
  1. CFEngine Community
  2. CFE-1665

Error parsing JSON

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Done
    • Priority: High
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.6.3
    • Component/s: Parsing
    • Labels:
      None
    • Platform:
      Any
    • Steps to reproduce:
      Not provided

      Description

      I was just playing around with some JSON data that I got from an API call to redmine.

      The JSON is valid as far as I can tell.

      <pre>
      > $ jsonlint --strict --verbose response.json
      response.json: ok
      </pre>

      Debug output. (Why does it stutter and say looking at art for function like object 'readjson' twice?)
      <pre>
      cf-agent -KIvdf ./main.cf -b redmine_issue
      2014-08-29T00:29:19-0500 verbose: /default/redmine_issue/vars: Evaluating promise 'request'
      2014-08-29T00:29:19-0500 verbose: /default/redmine_issue/vars: Evaluating promise 'response'
      2014-08-29T00:29:19-0500 debug: /default/redmine_issue/vars: Looking at arg for function-like object 'readjson'
      2014-08-29T00:29:19-0500 debug: /default/redmine_issue/vars: Looking at arg for function-like object 'readjson'
      2014-08-29T00:29:19-0500 error: /default/redmine_issue/vars: Error parsing JSON file '/home/nickanderson/CFEngine/a10042/services/skeletorg/redmine/./response.json'
      2014-08-29T00:29:19-0500 error: /default/redmine_issue/vars/'response'[0]: Error parsing JSON file '/home/nickanderson/CFEngine/a10042/services/skeletorg/redmine/./response.json'
      2014-08-29T00:29:19-0500 error: /default/redmine_issue/vars/'response'[0]: Error parsing JSON file '/home/nickanderson/CFEngine/a10042/services/skeletorg/redmine/./response.json'
      2014-08-29T00:29:19-0500 verbose: /default/redmine_issue/vars: Evaluating promise 'response_idx'
      2014-08-29T00:29:19-0500 debug: /default/redmine_issue/vars: Looking at arg for function-like object 'getindices'
      </pre>

      Setting to high because the JSON itself appears to be valid.
      Setting target version optimistically, if its unrealistic feel free to re-target. This is the first issue parsing json I have found.

        Attachments

        1. main.cf
          1 kB
          Nick Anderson
        2. response.json
          50 kB
          Nick Anderson

          Activity

            People

            • Assignee:
              a10042 Nick Anderson
              Reporter:
              a10042 Nick Anderson
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Summary Panel