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

java - unable show chart in xls document using jasper reports -

javascript - Slick Slider width recalculation -

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