changing message format to json