object initializer syntax furnish repremand json


i am attempting linq figure list information sole figure returned json an ajax call.



given data:



var information = new list<string>();
data.add("one");
data.add("two");
data.add("three");


and code: ** repremand needs fixed!! **



var made = data.select(c =>
new { c = c }
).tolist();

serializer.serialize(shaped,sb);
string desiredresult = sb.tostring();


i desiredresult be:



{
"one": "one",
"two": "two",
"three": "three"
}


but currently:



{ "c" : "one" },{ "c" : "two" }, etc.



one problem left side vigilant initializer i wish value c, c itself...



Comments

Popular posts from this blog

list macos calm editors formula editors

how hibernate @any-related annotations?

why does floated <input> control floated component slip over too distant right ie7, nonetheless firefox?