I don't understand the question. I am going to assume your are using JSON/XML purely for data
exchange. If this is the case than JSON is definitely the better choice. It must be marshalled and unmarshalled at both ends assuming you want to do anything with the data, which is why your question does not make sense. If I am some
java script running in a browser and I want to send some data to the server I must marshall that data into JSON and post it to the server. Now on the server side I must take the JSON message I received and unmarshall it into a java object and do something with the data that was sent. I then optionally may send a response which will have to be marshalled into JSON and sent to the client where once again it must be unmarshalled. If you have a different use case you are going to have to be more clear on what you are trying to accomplish.