?
Solved

How to Parse API Response.

Posted on 2013-01-03
1
Medium Priority
?
358 Views
Last Modified: 2013-01-04
Does anyone know a decent way to parse a response that look like this.  Ultimately I'm going to drop it in a database but  could work with it in an array.  there will be multiple groups and subgroups involved.   Any help is greatly appreciated.

[{"name":"AIR CONDITIONER & HEATER","key":"108","htaccess":"air-conditioner---heater-108","groups":
    [{"name":"Condenser, compressor & lines","key":"30128","htaccess":"condenser--compressor---lines-30128","subgroups":
       [{"name":"Check valve ","htaccess":"check-valve--47177","key":"47177"}
        ,{"name":"Clutch","htaccess":"clutch-31529","key":"31529"}
        ,{"name":"Clutch coil ","htaccess":"clutch-coil--46412","key":"46412"}
        ,{"name":"Compressor assy","htaccess":"compressor-assy-31060","key":"31060"}
        ]
      }
     ]
  }
]
0
Comment
Question by:Josh_Blade
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 9

Accepted Solution

by:
sognoct earned 2000 total points
ID: 38740105
It seems a JSON string, so, if you are developing under framework 4.5 there is the native :
System.Json Namespace

that allows you to parse sentence with :
JsonValue value = JsonValue.Parse(string2parse);

if the framework is 4.0 then you can read this article :
http://www.codeproject.com/Articles/349646/Dynamic-JSON-parser

if the framework is under 4.0 then try :
http://json.codeplex.com/
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
Suggested Courses

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question