procedure TForm4.btn3Click(Sender: TObject); var MyQj: TQJson; MyPrinter: TPrinter; begin MyQj := TQJson.Create; try MyPrinter.name := ‘A号打印机‘; MyPrinter.status := ‘enabled‘; MyPrinter.&type := ‘yes‘; MyQj.FromRecord<TPrinter>(MyPrinter); Memo1.Lines.Add(MyQj.AsJson); finally MyQj.Free; end; end;
时间: 2024-10-07 23:34:18