How can I navigate any JSON tree in c#? -


i need navigate json structure navigate xml using xmldocument.

the structure not known, , need iterate on nodes parse data.

is possible?
know can use javascriptserializer deserialize known type, not case can receive valid json.

i'm using .net 3.5 (sp1) , cannot upgrade 4.0 @ moment.
upgraded .net 4.0 use dynamic types (which awesomeness made code)

read article:

it explains way of parsing json dynamic object has dictionary inside.

so, iterating dictionary nice linq, wouldn't be?

--- or if you're in .net 3.5... --- ;)

why don't implement extension method "todictionary"?

you can receive json text, later parse regular expression , split properties , values dictionary, done suggested extension method.

a sample of how work that:

idictionary<string, object> deserializedjson = jsontext.todictionary(); 

fits needs?

--- yet try (now you've more options)! ---

check open source project on codeplex:

it has linq-to-json can read , write json.


Comments

Popular posts from this blog

python - Scipy curvefit RuntimeError:Optimal parameters not found: Number of calls to function has reached maxfev = 1000 -

c# - How to add a new treeview at the selected node? -

java - netbeans "Please wait - classpath scanning in progress..." -