Skip to content
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

Move JSON serialization methods into OrleansJsonSerializer #2206

Merged
merged 1 commit into from
Sep 23, 2016

Conversation

ReubenBond
Copy link
Member

This is a (minorly) breaking change which moves GetDefaultJsonSerializerSettings & UpdateSerializerSettings out of SerializationManager and into OrleansJsonSerializer.

It also makes OrleansJsonSerializer public so that external providers can reference it.

@@ -7,16 +7,25 @@

namespace Orleans.Serialization
{
internal class OrleansJsonSerializer : IExternalSerializer
using Orleans.Providers;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: please put using statements outside

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll fix my StyleCop settings. I think they're fairly close to the defaults.

ContainerNamePropertyName,
"SerializeTypeNames",
"PreserveReferencesHandling",
OrleansJsonSerializer.UseFullAssemblyNamesProperty,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SerializeTypeNames and PreserveReferencesHandling are bogus, aren't they? we don't seem to be using them at all

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

They seem to be bogus, I was considering removing them but wasn't 100% certain. I found no occurrences of those strings anywhere in our solution.

I'll nix them.

static OrleansJsonSerializer()
{
defaultSettings = GetDefaultSerializerSettings();
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the defaultSettings cached value is an old thing and we do not use it anymore. I'm not suggesting we should use it, because mutating this shared object is not expected but possible (and was causing sneaky side-effects, so that's why we stopped using it).

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I got confused, I guess it's OK... It's not configurable now, but that's orthogonal to this PR, merging

@sergeybykov sergeybykov modified the milestones: 1.3.0, 1.4.0 Sep 23, 2016
@jdom jdom merged commit 7dbdeed into dotnet:master Sep 23, 2016
@ReubenBond ReubenBond deleted the refactor-orleansjsonserializer branch February 23, 2017 09:56
@github-actions github-actions bot locked and limited conversation to collaborators Dec 12, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants