I'm setting up a java game server request handler that get json messages and send back relevant json message as response. In some cases I need to send 2 dimensional String array as the game board. I'm having a problem to do that using json-simple. Further more, how to parse it to a board in the client side afterwards? Thanks.
char[][] charArray; //initialised
JSONObject jsonOut = new JSONObject();
ObjectOutputStream writer = new ObjectOutputStream(socket.getOutputStream());
JSONArray ja = new JSONArray() ;
ja.add(charArray);
jsonOut.put("board", ja);
writer.writeObject(jsonOut);
getting exception while ja.add(charArray);