Click here to Skip to main content
15,886,597 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi to all..

actuually wat happend means..i create sample folder in 'D' and in that i created SAMPLE FOLDER ,again i created HELLO FOLDER and one .txt file, in that HELLO FOLDER i created two .txt files..
in that code i take default path like "D:\sample" the above entire directory structure displayed like as a string..
string is like this: abc.txt hello xyz.txt pqr.txt..
now i want to serilaize the entrire directory structure and i want the output like this:
{"Root":"d:\\"{"mainfolder":"sample","mfile":"abc.txt","subfolder":"hello"{"hfile1":"xyz.txt","hfile2":"pqr.txt"}}}..
if any body knows pls let me know..
thanks in advance..
Posted
Comments
BobJanova 8-Aug-11 10:33am    
repost: http://www.codeproject.com/Questions/236704/serialize-the-path-in-json

1 solution

Check out fastJSON[^] for the JSON part.
And look at DirectoryInfo Class[^] and FileInfo Class[^] for folder and file info.
 
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