Allow specifying JsonSerializer in constructor
Merge from wampv1