-
Notifications
You must be signed in to change notification settings - Fork 73
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
Add support for JsonSerializationSettings #56
Comments
Can you elaborate on the scenario you are trying to solve? |
Shure! The crm project I'm working in has really badly named fields, and I want my dto objects to have nicer names. Also I want the dtos clients get using the library to serialize to json normally, so using JsonProperty or other standart attributes is out of the question. I figured out I could write custom attributes and contract resolver, but I need to supply that in serialization settings. |
ok I see, now I didn't look to hard at this, but take a look at http://blog.maskalik.com/asp-net/json-net-implement-custom-serialization/ - I believe Get<> and GetList<> would let you provide your own class, if you attribute it as this blog post indicated it looks like it would let your custom serializer do the work - disclaimer I didn't dig in too deep on the article - let me know if that gets you toward what you are trying to accomplish |
That won't do - it's the same as using JsonProperty attributes. I want to have a special kind of json serialization just for the crm, and let the classes work normally with other json serialization cases, but decorating property or a class with json attributes will apply them globally. |
So what changes to the API would you like to see? |
I think API-wise the best thing will be ability to set JsonSerializationSettings for CRMWebAPI object. |
Hello!
Currently there's no straightforward way to customize json serialization process for this package. Can you add it?
Thank you!
The text was updated successfully, but these errors were encountered: