How to cast JSONArray to int array?

后端 未结 5 1551
一生所求
一生所求 2020-12-06 18:31

I\'m having problems with the method JSONObject sayJSONHello().

@Path(\"/hello\")
public class SimplyHello {

    @GET
    @Produces(MediaType.A         


        
5条回答
  •  孤城傲影
    2020-12-06 18:44

    You can also do this

    JSONArray numberArr=jsonObject.getJSONArray("numbers");
    
                int[] arr=new int[numberArr.length()];
                for(int k=0;k

提交回复
热议问题