baran_2005
سه شنبه 03 بهمن 1396, 18:30 عصر
برای نمایش فارسی مشکل دارم به صورت علامت سوال نمایش میده . لطفا راهنمایی . سپاس
procedure TForm1.Button2Click(Sender: TObject);
var
JSonObject:TJSonObject;
JSonValue:TJSonValue;
st:string;
Begin
st :=UTF8Encode( '{"data":{"records":[{"stname":"نمايشگاه","StId":1},{"stname":"پارک","StId":2},{"stname":"تقي آباد","StId":3},{"stname":"پیروزی","StId":4},{"stname":"استقلال","StId":5}],"status":true}}');
JSonObject := TJSonObject.Create;
JsonValue:=JSonObject.ParseJSONValue( st);
memo1.text:=( (JsonValue as TJSONObject).Get('data').JsonString.Value);
JSonObject.Free;
end;
procedure TForm1.Button2Click(Sender: TObject);
var
JSonObject:TJSonObject;
JSonValue:TJSonValue;
st:string;
Begin
st :=UTF8Encode( '{"data":{"records":[{"stname":"نمايشگاه","StId":1},{"stname":"پارک","StId":2},{"stname":"تقي آباد","StId":3},{"stname":"پیروزی","StId":4},{"stname":"استقلال","StId":5}],"status":true}}');
JSonObject := TJSonObject.Create;
JsonValue:=JSonObject.ParseJSONValue( st);
memo1.text:=( (JsonValue as TJSONObject).Get('data').JsonString.Value);
JSonObject.Free;
end;