Resolved the issues about sending and receiving JSON