android中的嵌套JSON对象和JSON数组

android中的嵌套JSON对象和JSON数组,android,Android,android中的嵌套JSON对象和JSON数组 { "ocrNumber": "0123456", "userName": "dddd", "photo": [{ "lat": "13.1234", "long": "7.1234", "imagepath": "sd / image / demo.jpg" }] } 如果语法错误,请忽略语法在中发布

android中的嵌套JSON对象和JSON数组

{
        "ocrNumber": "0123456",
        "userName": "dddd",
        "photo": [{
            "lat": "13.1234",
            "long": "7.1234",
            "imagepath": "sd / image / demo.jpg"
        }]
    }
如果语法错误,请忽略语法

在中发布json,您将获得zip格式的模型。您可以轻松地将它们添加到应用程序中

//在json对象中设置json Arrya。
    // Make The Json Arrya in Json Object Programeticall.
    //                    JSONObject person1 = new JSONObject();
    //                    try {
    //                        if(contacts_arraylist.get(j).getName()!=null) {
    //                            person1.put("name", contacts_arraylist.get(j).getName());
    //                        }
    //                        else {
    //                            person1.put("name","");
    //                        }
    //
    //                        if(contacts_arraylist.get(j).getEmails().size()>0)
    //                        {
    //                            person1.put("email", contacts_arraylist.get(j).getEmails().get(0).address);
    //                        }
    //                        else {
    //                            person1.put("email", "");
    //                        }
    //
    //                        if(contacts_arraylist.get(j).getNumbers().size()>0)
    //                        {
    //                            person1.put("mobile_number", contacts_arraylist.get(j).getNumbers().get(0).number);
    //                        }
    //                        else {
    //                            person1.put("mobile_number", "");
    //                        }
    //
    //                        personarray.put(person1);
    //                    } catch (JSONException e) {
    //                        e.printStackTrace();
    //                    }
  );
        }
    }

    private void signOut() {
        Auth.GoogleSignInApi.signOut(mGoogleApiClient).setResultCallback(
                new ResultCallback<Status>() {
                    @Override
                    public void onResult(Status status) {
                        /*Toast.makeText(getApplicationContext(), "Loged Out", Toast.LENGTH_SHORT).show();*/
                    }
                });
    }

    @Override
    public void onConnectionFailed(@NonNull ConnectionResult connectionResult) {
       // Log.d("GOOGLE_LOGIN", "onConnectionFailed:" + connectionResult);

    }
}
//JSONObject person1=新的JSONObject(); //试一试{ //if(contacts_arraylist.get(j).getName()!=null){ //person1.put(“name”,contacts_arraylist.get(j.getName()); // } //否则{ //人1.把(“姓名”、“姓名”); // } // //if(contacts_arraylist.get(j.getEmails().size()>0) // { //person1.put(“email”,contacts_arraylist.get(j.getEmails().get(0.address)); // } //否则{ //人1.把(电子邮件)放进去; // } // //if(contacts_arraylist.get(j).getNumbers().size()>0) // { //person1.put(“mobile_number”,contacts_arraylist.get(j).getNumbers().get(0).number); // } //否则{ //人名1.put(“手机号码”); // } // //人物角色(person1); //}catch(JSONException e){ //e.printStackTrace(); // } ); } } 私有无效签出(){ Auth.GoogleSignInApi.signOut(mgoogleapclient.setResultCallback)( 新的ResultCallback(){ @凌驾 公共void onResult(状态){ /*Toast.makeText(getApplicationContext(),“注销”,Toast.LENGTH\u SHORT.show()*/ } }); } @凌驾 public void onconnection失败(@NonNull ConnectionResult ConnectionResult){ //Log.d(“GOOGLE_登录”,“onConnectionFailed:+connectionResult”); } }
那么您的问题是什么?您想要什么?您真正想要我们帮您做什么?这里发生了什么?请格式化你的问题。实际上我无法将其转换为代码。我在这里面临一些问题…我是android的新用户,因此我需要你的帮助。。