Added an extension point to JsonMessageSerializer allowing inheriting classes to override the stream encoding.