I am trying to find an example of how to customize my .Net Framework Web API, to handle requests and responses with a custom serialization library instead of the built-in Newtonsoft library. So when request arrives to one of my controllers with content-type of 'application/json', my custom formatter will automatically deserialize its body to the controller's expected object. And when an object is returned from an of controller's endpoints - again, my custom formatter will take this object and serialize it to json string.
.Net Framework Web API - Custom Json serialization for requests and responses
422 Views Asked by user2055886 At
1
There are 1 best solutions below
Related Questions in JSON
- getting undefined while iterating json
- How can I serialize a numpy array while preserving matrix dimensions?
- What is best way to check if any of the property of object is null or empty?
- How to query JSON data according to JSON array's size with Spark SQL?
- Extracting data from json_decode with lat and lng geolocation
- Convert JSON.gz to JSON in node js
- How do I get the type to convert to when deserializing from Jackson
- Escape dot in jquery validate plugin
- Are allOf and properties keywords interchangeable?
- Sort continents by amount of countries
- Is there a data format lighter than json?
- Object of class CS_REST_Wrapper_Result could not be converted to string in CAMPAIGN MONITOR
- How to read JSON data from a web server running PHP and MySQL?
- Parse Nsmutabledictionary and extract value
- Handle empty JSON values in Java
Related Questions in .NET-FRAMEWORK-VERSION
- Visual Studio Assembly force-installs Target Framework
- vb .net application stopped working event name clr20r3
- How can I retarget the framework for a .NET Core application in Visual Studio 2015?
- .NET Framework version causing different behavior between two different machines?
- C# get Property method not found
- 'Microsoft.CodeDom.Providers.DotNetCompilerPlatform' Error
- Can't use Direct Query mode in tabular project In Analysis service
- I have Visual Studio for my Business Intelligence tools, how do I add C# to it?
- How does nuget detect framework version?
- Krypton Contextmenu does not open under .Net FW 4.0
- How to know which .net framework is required for my program?
- Disable the page start only for a particular page
- How to force fire OnModelCreating every DataContext initialized up
- .NET Framework 4.6.2 Release DWORD different from Version REG_SZ
- Advantages of .NET 3.5 vs 2.0, for customers
Related Questions in WEBAPI
- Web API returning null JSON objects C#
- Is there any way to find out when an album got added to Spotify with the web API?
- How can I pass parameter of type HttpContent in web api?
- Error when trying to insert a view using web API with ember template
- Web API which enables Access-Control-Allow-Origin to *
- Database function Mock is not working in c# web api unit testing
- Using JWT authentication with Oboe,js
- Navigator.share() doesn't work for second time
- What should be status code of my Rest API if it is dependent on third party service and the results from service are invalid?
- How to send get request to a web API using CURL?
- Submitting a form through Javascript via POST method
- The PostAsync in HttpClient doesn't send data to my webapi
- create c# class for json string which have number as variables in object
- The column name 'userid' is specified more than once in the SET clause > or column list of an INSERT
- dotnet core / C# WebAPI - Controllers as Plugins
Related Questions in FORMATTER
- Eclipse PHP formatter - newline only for associative arrays
- Coverting String to LocalTime with/without nanoOfSeconds
- apply formatter only on edited code - eclipse
- Extjs Format of numberfield
- Spring Custom formatter not call
- AutoMapper to apply common/global formatter on all fields?
- Yii2 GridView - attribute format based on value of other attribute
- UI5 formatter not working
- Can a JFormattedTextField be assigned a formatter which has placeholders
- How to use a double formatter in SAPUI5?
- Is it ok to write in file with Formatter?
- How to add a new line at the beginning of constructor body in Eclipse formatter?
- Currency Formatting: Remove insignificant Zeros
- AngularJS case-insensitive binding to a dynamic select dropdown without changing the ng-bind value to lower or upper case
- Macro that generates formatters dynamically in Rust
Related Questions in REQUEST-RESPONSE
- Trying to build an uptime-monitoring-api with node.js. But issue while trying to create a new data. No error happened neither it is responding
- .Net Framework Web API - Custom Json serialization for requests and responses
- How to set up a ZeroMQ request-reply between a c# and python application
- Mass Transit - Are messages still delivered after timeout with RabbitMQ
- How to register GenericRequestClient in MassTransit using Autofac
- changing the DOM after accessing a database
- Add RequestDTO and ResponseDTO in common DTO or use them separately?
- Implementing Request Response in Apache Kafka java
- Is there a GCP equivalent to AWS SQS?
- MassTransit - Getting response from request-response ok but message added and deleted from skipped queue?
- Sending request reponse message on Artemis using C#
- Implementation HTTP synchronous request response
- Using both, request-reply and pub-sub for microservices communication
- RabbitMQ RPC load balancing
- Is there a way how to extract data from response.content in python?
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
Ok, Found the solution. Basically I just needed to implement System.Net.Http.Formatting.MediaTypeFormatter abstract class. This implementation will be used as definition for my API endpoints serialization. Eventually I needed to add my new implementation to GlobalConfiguration object in Global.asax file: