Converting over to full JSON when communicating between server and client