Skip to content

Add possibility to set own JsonSerializerSettings in configuration #43

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

Merged
merged 2 commits into from
Nov 7, 2014

Conversation

BartAdv
Copy link
Contributor

@BartAdv BartAdv commented Nov 5, 2014

This allows to pass own settings to be used for server-side rendering, for example the same you've got in your ASP.NET configuration:

var settings = GlobalConfiguration.Configuration.Formatters.JsonFormatter.SerializerSettings;

ReactSiteConfiguration.Configuration.SetJsonSerializerSettings(settings);

This affects how components are rendered server-side.
/// <summary>
/// Gets the global site configuration.
/// </summary>
IReactSiteConfiguration Configuration { get; }
Copy link
Member

Choose a reason for hiding this comment

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

This isn't necessary; the IReactSiteConfiguration and IReactEnvironment are two separate registrations in the IoC container. Please remove it.

Daniel15 added a commit that referenced this pull request Nov 7, 2014
Add possibility to set own JsonSerializerSettings in configuration
@Daniel15 Daniel15 merged commit e3dfe20 into reactjs:master Nov 7, 2014
@Daniel15
Copy link
Member

Daniel15 commented Nov 7, 2014

Thanks!

Normally the build server would pick this up and I'd suggest using the latest dev builds (it builds master and uploads to a custom package repository), but something's broken in TeamCity at the moment so the development packages aren't being built at the moment :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants