Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

getting error while accessing key value from the json data in script runner confluence

Sushma
September 12, 2019

Hi Team

I am trying to retrieve the key values from the JSON data in the confluence script runner.

but i am getting the below error.

groovy.json.JsonException: expecting '}' or ',' but got current char 's' with an int value of 115 The current character read is 's' with an int value of 115 expecting '}' or ',' but got current char 's' with an int value of 115 line number 9 index number 217 "value": "<at:declarations /><ac:structured-macro ac:name="section" ac:schema-version="1" ac:macro-id="8d7755f6-be87-4926-80d6-9561a0002bf0"><ac:rich-text-body><p><ac:task-list> .......................................................................^ at Script229.run(Script229.groovy:71)

 

Anyone please help me to resolve this.

Regards

Sushma

1 answer

Suggest an answer

Log in or Sign up to answer
1 vote
Neta Elyakim
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Champions.
April 30, 2018

Use this:

def duedate = issue.getDueDate()

if( duedate [Calendar.DAY_OF_WEEK] == Calendar.WEDNESDAY){

}

 Calendar.DAY_OF_WEEK- return int 1-SUNDAY, 2-MONDAY, 3-... exc

TAGS
AUG Leaders

Atlassian Community Events