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;
import org.json.JSONObject;

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

    @RequestMapping(method = RequestMethod.POST)
    public @ResponseBody WebhookResponse webhook(@RequestBody String obj){
       String text = null;
try{
	    	JSONObject objS = new JSONObject(obj);
//          System.out.println(objS.get("id"));
          JSONObject result = objS.getJSONObject("result");
           text = result.getString("resolvedQuery");
            
          
}catch(Exception e){
	text = "last ctach"+e.getMessage();
}

	        return new WebhookResponse( text, text);
	    }
}

@@ -485,31 +485,22 @@
 nseBody 
-WebhookResponse
+String
  webhook
@@ -553,16 +553,56 @@
 = null;%0A
+       String respostring=null;%0A       %0A
 try%7B%0A%09  
@@ -817,16 +817,22 @@
        %0A
+%09    %0A
         
@@ -907,48 +907,86 @@
     
- 
 return 
-new WebhookResponse( text, text)
+ %22%7Bspeech: %22+text+%22,displayText: %22+text+%22, source: biz-webhook-sample%7D%22
 ;%0A%09 

Update HelloWorldController.java