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

Popular posts from this blog

javascript - Slick Slider width recalculation -

jsf - PrimeFaces Datatable - What is f:facet actually doing? -

angular2 services - Angular 2 RC 4 Http post not firing -