0
能fpjson处理负载和以下结构的自/至JSON节省:FreePascal的:JSON和递归数据结构
PTreeStructure = ^TTreeStructure;
TTreeStructure = class
name: string;
value: Integer;
items: array of PTreeStructure;
end;
谢谢!
能fpjson处理负载和以下结构的自/至JSON节省:FreePascal的:JSON和递归数据结构
PTreeStructure = ^TTreeStructure;
TTreeStructure = class
name: string;
value: Integer;
items: array of PTreeStructure;
end;
谢谢!
这看起来不像您的真实类型。当然,它是'记录'而不是'class'。 –
这有什么关系?我只是简化了结构以显示项目的关键点:PTreeStructure数组; – xrfang
类是需要由构造函数实例化的引用类型。记录是可以自动分配的值类型。我会认为它很重要。无论如何,如果你必须使用一个类,就这样吧。但是在那种情况下,我很惊讶使用'PTreeStructure =^TTreeStructure',因为这是一个指向指针的指针。这是如何分配的? –