How to parse a JSON array in RAd Studio?
问题 I am trying to parse the following Json document: [ {"EventType":49,"Code":"234","EventDate":"20050202", "Result":1}, {"EventType":48,"Code":"0120","EventDate":"20130201", "Group":"g1"} ] I use the following code: TJSONObject* jsonread0 = (TJSONObject*) TJSONObject::ParseJSONValue(TEncoding::ASCII->GetBytes(Memo1->Lines->Text), 0); for(int i=0;i<jsonread0->Size();i++) { TJSONPair* pair = jsonread0->Get(i); At this point, pair.JsonValue is NULL. What do I need to do to read the values? 回答1: