I have api calls that return expando object & dynamic objects. Even though I have NullValueHandling set to IgnoreNulls, nulls are still sent back in the resulting json. I have tested it with my other calls that return POCO objects, and they function correctly (omitting null value fields). Is there a way around this?
I was thinking of trying to convert the expando\dynamic objects to something that that the serializer could process the same way it does POCO object results, but I don't know what that would be.
I tried manually serializing the object and then de-serializing it into a JSONArrayObject before it gets to the final Serialization in the MVC middleware, but that didn't work.
Also, I can't just create a POCO for these objects, because they are the result of "Data Shaping" i.e. the user sends in the fields they want to receive in the object, and then we take the resulting POCO, and turn it into an expando object with only the fields they requested.