package hello;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
@RequestMapping("/webhook")
public class HelloWorldController {

    @RequestMapping(method = RequestMethod.POST)
    public @ResponseBody WebhookResponse webhook(@RequestBody String obj){

        System.out.println(obj);

        return new WebhookResponse("Hello! " + obj, "Text " + obj);
    }
}

@@ -520,30 +520,254 @@
     
-System.out.println(obj
+%0A        JSONObject objS = new JSONObject(obj);%0A//          System.out.println(objS.get(%22id%22));%0A          JSONObject result = objS.getJSONObject(%22result%22);%0A          String text = result.getString(%22resolvedQuery%22);%0A        System.out.println(text
 );%0A%0A
@@ -805,38 +805,18 @@
 nse(
-%22Hello! %22 + obj, %22Text %22 + obj
+text, text
 );%0A 

Update HelloWorldController.java