Click here to Skip to main content
15,886,799 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
[{"ModuleID":1,"ModuleName":"Library"},{"ModuleID":2,"ModuleName":"Admission"},{"ModuleID":3,"ModuleName":"Exam"}]


I want to remove this data from json file and want empty file
Posted
Comments
Sergey Alexandrovich Kryukov 28-Aug-14 1:41am    
Why? Define "empty". Is string.Empty empty enough for you? :-)
—SA

1 solution

Null is a reserved value in JSON.
So you can set the file to [] rather than [null].
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900