fork download
  1. 部分code
  2. JSONObject mTitle = new JSONObject(mJsonText);
  3.  
  4. JSONArray arrayJson=mTitle.getJSONObject("result").getJSONArray("fields");
  5. try {
  6. String s="";
  7. for(int i = 0 ; i <arrayJson.length() ;i++){
  8. JSONObject lib = arrayJson.getJSONObject(i);
  9. String json = lib.toString();
  10. String type = lib.getString("type");
  11. String id = lib.getString("id");
  12. s+=id+",";
  13. }
  14. t1.setText("名稱:");
  15. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
Main.java:1: error: class, interface, or enum expected
??code
^
Main.java:4: error: class, interface, or enum expected
JSONArray arrayJson=mTitle.getJSONObject("result").getJSONArray("fields");
^
Main.java:5: error: class, interface, or enum expected
try {
^
Main.java:7: error: class, interface, or enum expected
   	for(int i = 0 ; i <arrayJson.length() ;i++){
   	^
Main.java:7: error: class, interface, or enum expected
   	for(int i = 0 ; i <arrayJson.length() ;i++){
   	                ^
Main.java:7: error: class, interface, or enum expected
   	for(int i = 0 ; i <arrayJson.length() ;i++){
   	                                       ^
Main.java:9: error: class, interface, or enum expected
  	String json = lib.toString();
  	^
Main.java:10: error: class, interface, or enum expected
  	String type = lib.getString("type");
  	^
Main.java:11: error: class, interface, or enum expected
  	String id = lib.getString("id");
  	^
Main.java:12: error: class, interface, or enum expected
   	s+=id+",";
   	^
Main.java:13: error: class, interface, or enum expected
    }
    ^
Main.java:15: error: class, interface, or enum expected
}
^
12 errors
stdout
Standard output is empty