1

I'm using the sonarQube 6.4 web api to get a list of issues

http://sonar-server:9000/api/issues/search?componentKeys=Project_key&sinceLeakPeriod=true&statuses=OPEN,REOPENED&types=BUG

This gives me a Json object which has single quotes,

..."message":"Make this function anonymous by removing its name: 'function() {...}'."...

Because of that highlighted content in the JSON I'm unable to process the JSON from Groovy.

Is the JSON returned by the sonar is valid ? if so, is there any way to process this kind of JSON in groovy. Let me know if the full JSON object is needed.

zeee
  • 401
  • 1
  • 6
  • 16

1 Answers1

1

According to http://json.org/ and https://jsonformatter.curiousconcept.com/ the JSON response is valid. Single quotes and brackets {} must not be escaped. The issue comes from your Groovy parser.

Simon Brandhof
  • 5,137
  • 1
  • 21
  • 28