Fixed multi-thread issue with JsonSerializer.