-
Notifications
You must be signed in to change notification settings - Fork 166
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove $type field #27
Comments
The If you remove I'll look into adding a config to allow FS to act more like a JSON dumper, which sounds to be more like what you want (noticing some of the other issues you created). |
Gotcha. Is this an issue if I pass a specific type along with the json ? See my API wrapper : (Am I to understand that FS actually can detect my object? TIL, cool) ? In my scenario I am communicating with a server side api. It fails if my json contains illegal properties ($Type). The ability to remove properties post-deserialization is good enough for me. |
I looked into adding a mode to prevent deserialization metadata from being added (like I've included a post-processor that removes the annotations in void DoSerialize<T>(T obj) {
fsData data;
Serializer.Serialize(obj, out data).AssertSuccessWithoutWarnings();
fsSerializer.StripDeserializationMetadata(ref data);
} |
I can work with that. |
I noticed that the serializer adds a $type field to serialized objects. What would the quickest way to remove the $type field ? Is this something I can handle in my interface class ?
The text was updated successfully, but these errors were encountered: