c# - Is it possible to put multiple data types into a JSON file? -
i serializing , writing object list json file c# code:
string json = jsonconvert.serializeobject(drawlist); file.writealltext(@"c:\my\sample\path\package.json", json);
is possible write integer json file, , if how should parsed list , integer separate?
sure.
string json = jsonconvert.serializeobject(new {integer = 1, list = drawlist}); file.writealltext(@"c:\my\sample\path\package.json", json);
Comments
Post a Comment