How to cast JSONArray to int array?

后端 未结 5 1542
一生所求
一生所求 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 19:00

    Instead of -

    result.put("numbers", numbers);
    

    you can try (I haven't tested this though)

    result.put(numbers);
    

    Or iterate through the array "numbers" and put each one individually into the "result".

提交回复
热议问题