Fix serialization issues in JsonFrameworkSerializer