Suppose my input is following JSON:
{obj: { x: "", y: "test str" }, myStr: "Hi"}
I would like to remove all empty strings and strings with a value of N/A so that the output becomes:
{obj: { y: "test str" }, myStr: "Hi"}
Note the above input is just a sample input file.
I tried to write some code :
var serializerSettings = new JsonSerializerSettings
{
NullValueHandling = NullValueHandling.Ignore,
DefaultValueHandling = DefaultValueHandling.Ignore
};
But I'm not able to get the desired output.