ability to use custom encoding with JSON serializer