Quantcast
Channel: codetitans Discussions Rss Feed
Viewing all articles
Browse latest Browse all 23

New Post: JSonObject IEnumerable?

$
0
0
I have a json string which contains an array of dictionaries for a TreeView. However the following won't compile as IJSonObject can't be converted to System.Collections.IEnumerable. Can IJSonObject be modified to support this case?

s = @"[{""title"":""Title1"",""children"":[{""title"":""Child1"",""children"":[{""title"":""grandchild1"",""children"":[{""title"":""Huh""}]}] }] }]";

JSonReader jr = new JSonReader();
IJSonObject json = jr.ReadAsJSonObject(str);
mTreeView.ItemsSource = json;

Viewing all articles
Browse latest Browse all 23

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>