This is demo generated TRootClass:
TRootClass = class
private
FItems: TArray<TItemClass>;
public
property Items: TArray<TItemClass> read FItems write FItems;
destructor Destroy; override;
function ToJsonString: string;
class function FromJsonString(AJsonString: string): TRootClass;
end;
When calling TRootClass.FromJsonString, it will throw exception.