在刀片文件中显示解析错误

时间:2016-04-21 10:54:39

标签: laravel laravel-5 laravel-5.1

我是laravel的初学者,在laravel中构建一个简单的应用程序。但有些东西显示我在刀片文件中解析错误,我花了几个小时在id.Any帮助表示赞赏。

 Runnable mcsJob = new Runnable(){
   public void run(){ 
   try {

           CustomAPI customApi = mobileBackend.getServiceProxyCustomApi();            
           MCSRequest request = new MCSRequest(mobileBackend.getMbeConfiguration());
           request.setConnectionName(mafConnection);            
           request.setRequestURI(requestURI);            
           request.setHttpMethod(httpMethod);            
           request.setPayload(payload==null?"":payload);
           request.setRetryLimit(0);
           HashMap<String,String> headers = new HashMap<String,String>();

           if(httpHeaders!=null)
           {
               headers.putAll(httpHeaders);
           }

           request.setHttpHeaders(headers);  
           MCSResponse response = customApi.sendForStringResponse(request);
           String jsonResponse = (String) response.getMessage(); 
           setEmployeeSearchResponse(jsonResponse);
           //Converting JSON string
           apiResponse.setEmpsearchResponse(employeeSearchResponse);
           JSONObject jsonObject = new JSONObject(apiResponse.getEmpsearchResponse());
           JSONObject bodyObject = jsonObject.getJSONObject("Body");
           JSONObject ProcessObject=bodyObject.getJSONObject("processResponse");
            JSONArray empObject=ProcessObject.getJSONArray("ImageList"); 

           for(int i=0;i<empObject.length();i++)

               {

                JSONObject js = empObject.getJSONObject(i); 
                String name= ""+js.getString("ENO");
                String photo = ""+js.getString("ENAME");
                String empno=""+js.getString("EJOB");
                 EmployeeSearchPOJO  empo=new EmployeeSearchPOJO();
                  empo.setEMPNO(empno);
                   empo.setENAME(name);
                   empo.setPHOTO(photo);   
                   employeeList.add(empo);

               }

      }     

1 个答案:

答案 0 :(得分:1)

您使用的是两个嵌套的三元运算符,但我只能看到一个:符号。