Allow customization of json serialization settings for messages