I am trying to handle some JSON data. But what I am getting seems to be odd. This is whats returned
JSON: {
drugname = ETOFENAMATE;
"prescribing_notes" = "<b>Muscle pain and inflammation:</b> Apply and massage 5-10cm
strip of gel to affected area.";
rag = {
kidney = A;
lactation = R;
liver = A;
pregnancy = R;
sports = G;
};
So drugname is a NSString
rag is a dictionary.
But what should i be doing with “prescribing notes” ?
I put that object into a NSString but the NSString was then NULL at the end. Its HTML so I will be drawing there text inside a UIWebView when i eventually figure out the correct way to handle/extract it into a NSString.
Thanks,
-Code
You need to check if the JSON object returned is a valid one or not. Use following link to check the validity of JSON String.
JSONLint