Closed functional-brew closed 6 years ago
Yes, I myself had used it with target framework netcoreapp2.0
. Make sure your request looks like in the example from StackOverflow.
As an alternative, you can try to use Patrice Cotes method and don't use this NuGet package at all as it's already build in.
TheInsaneBro, Thanks a ton rechecked everything from the post and viola!! I can see the library in action now.
In ReadMe file, you have mentioned adding (.AddMvc().AddJsonOptions(...)) to startup.cs It would be great if you can help me with an example for adding the config?
Sure. In your Startup.cs
in ConfigureServices
:
services.AddMvc()
.AddJsonOptions(options =>
options.SerializerSettings.Converters.Add(new StringEnumConverter())
// And do other configurations for Newtonsofts JSON.Net
);
Make sure to add the nuget package Microsoft.AspNetCore.Mvc.Formatters.Json
(or Microsoft.AspNetCore.All
)
Could have probably made that more clear in the readme.
Hi,
I saw the reference to this library at a StackOverflow question.
Does this library work with dot net core 2, as I always get null value for the parameter decorated with
the
[ModelBinder(BinderType = typeof(JsonModelBinder))]
controller action method.I had created an empty project and then installed the library via Nuget.