Serialize to string before stripping out namespaces