Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I need to pass this as a string in tJava and I need to escape the double qoutes with a variable in the middle .
String cursor2;
cursor2 = " \"cursor\" " + ":" + row5.cursor ;
context.Body="{\"location_ids\":[\"" + (String) globalMap.get("locations") +"\"], \"" + cursor2 + "\"}" ;
Here is the cuurent result, I'm missing the double quotes in front of the g and I have an extra infront of the word cursor?
body {"location_ids":["27NA2Q0DDW471"], " "cursor" :gc7IdfFn6y61gTgvVxFSTIw9xHVpRnr7oggL"}
I need my body to look like this.
body {"location_ids":["27NA2Q0DDW471"], "cursor" :"gc7IdfFn6y61gTgvVxFSTIw9xHVpRnr7oggL"}
Any help would be appreciated.
Bob
Thanks, I fixed it with
cursor2 = " \"cursor\" :" + "\"" + row5.cursor + "\"}" ;
context.Body="{\"location_ids\":[\"" + (String) globalMap.get("locations") + "\"]," + cursor2 ;
Hi
For debugging, print the value of row5.cursor on the console to check if it has the expected value.
cursor2 = " \"cursor\" " + ":" + row5.cursor;
System.out.println(row5.cursor);
System.out.println(cursor2);
Regards
Shong
Thanks, I fixed it with
cursor2 = " \"cursor\" :" + "\"" + row5.cursor + "\"}" ;
context.Body="{\"location_ids\":[\"" + (String) globalMap.get("locations") + "\"]," + cursor2 ;