Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

How to remove or hide default property from json output which using default library of asp.net

I’ve got code on fist screenshot first screenshot, needed to display only this four properties. But when i start using this code i get my 4 properties + 2 unnecessary. Second screenshot(result):second screenshot

I tried to this one, but its not workingfull code with an attempt

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

use an anonymous type instead of ProblemDetails

var json= JsonConvert.SerializeObject ( new 
                                  {
                                    Status=....
                                   });
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading