Last post Jun 05, 2016 07:37 PM by yosigolanb
May 31, 2016 08:54 AM|yosigolanb|LINK
i am using the latest asp.net core RC2 in a web api project.
i have a type with costume serializer and de-serialize. when i return the type as the body of request the serializer is called and the expected string is sent back to the client.
how ever, when the client sends the same formatted string as query param (http://localhost:5000/api/?data=3f95e49e-a2f0-4a7d-9bb8-ad2c13e23260) the custom de-serializer is not called and the returned type is empty.
in other scenarios the custom de-serializer works great.
is it a bug?
May 31, 2016 09:31 AM|damienBod|LINK
You need to add an OutputFormatter as well as an InputFormatter
Jun 05, 2016 07:37 PM|yosigolanb|LINK
Thanks but how?
i am using asp.net core rc2 and i dont find a way to set input or output formaters... currently i added a contract converter which works fin in serialization and de-serialization but not with query params.