Skip to content

Add SerializerSettings to JsonApiOptions #187

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 3 commits into from
Nov 11, 2017
Merged

Add SerializerSettings to JsonApiOptions #187

merged 3 commits into from
Nov 11, 2017

Conversation

dnperfors
Copy link
Contributor

Closes #185

FEATURE

  • write tests that address the requirements outlined in the issue
  • fulfill the feature requirements
  • bump package version

Open question: Should JsonContractResolver property be made Obsolete in favor of the new SerializerSettings property?

Copy link
Contributor

@jaredcnance jaredcnance left a comment

Choose a reason for hiding this comment

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

Thanks for the PR!

Please re-submit after adjusting your editor's format settings. Should use spaces for the indent style with an indent size of 4.

}
}
}
public class JsonApiOptions
Copy link
Contributor

@jaredcnance jaredcnance Nov 11, 2017

Choose a reason for hiding this comment

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

Please fix formatting here. There is no need to change the size of the whitespace, nor introduce line spaces between properties. It also makes diffs more difficult and creates noise when looking at file line history.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I really thought I had my settings on spaces, but perhaps that is because I am used to using an editorconfig file... The extra lines where added by the CodeMaid plugin I use a lot, but I will disable that.

Copy link
Contributor

Choose a reason for hiding this comment

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

That's fair. TBH I thought we had an .editorconfig :oops: thanks for mentioning it and I'll get that added.


internal IContextGraphBuilder ContextGraphBuilder { get; } = new ContextGraphBuilder();

public JsonSerializerSettings SerializerSettings { get; } = new JsonSerializerSettings()
Copy link
Contributor

Choose a reason for hiding this comment

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

👍
nit: let's move this to the line directly beneath the JsonContractResolver since they are related. Also, I agree that we should mark the JsonContractResolver as Obsolete


return entity;
}
public class JsonApiDeSerializer : IJsonApiDeSerializer
Copy link
Contributor

Choose a reason for hiding this comment

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

Please fix whitespace formatting. I won't try to review this diff until it is absolutely clear what has been changed.

@dnperfors
Copy link
Contributor Author

I made the changes, you want met to squash the commits together before it will be merged?

@jaredcnance
Copy link
Contributor

jaredcnance commented Nov 11, 2017

LGTM, Thanks! I'll get a release out today or tomorrow.

@jaredcnance jaredcnance merged commit 5bf0e52 into json-api-dotnet:master Nov 11, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants