Looking for flexible deserialization option - it should ignore data type gracefully and have a provision to provide fields(full path) which needs to ignored from deserialization process.
Loading
Looking for flexible deserialization option - it should ignore data type gracefully and have a provision to provide fields(full path) which needs to ignored from deserialization process.
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Jaimin ShethiyaPosted Jun 7, 2024, 5:26 AM
Hello Rajendra,
You can refer below links.
https://www.newtonsoft.com/json
https://www.nuget.org/packages/Newtonsoft.Json/
if you can provide some use cases then, it will helpful to us to better guide.
Thanks
Jaydeep PatilPosted Jun 5, 2024, 5:42 PM
Newtonsoft.Json
Vishal YelvePosted Jun 5, 2024, 3:27 PM
Hi Rajendra,
try to use
[JsonIgnore]tag above ur model propertyexample
and then use this
Jayraj ChhayaPosted Jun 5, 2024, 1:35 PM
In C#, you can achieve flexible JSON deserialization using libraries like Newtonsoft.Json (Json.NET). This library provides various options for deserialization, including handling data type mismatches gracefully and ignoring specific fields during the process.
To ignore specific fields during deserialization, you can use the
[JsonIgnore]attribute from Json.NET.Abhishek ChadhaPosted Jun 5, 2024, 12:11 PM
you can try with newtonsoft.json