Allow specifying JsonSerializer in constructor