Delphi-JsonToDelphiClass icon indicating copy to clipboard operation
Delphi-JsonToDelphiClass copied to clipboard

Object can't be converted from Json array

Open caowm opened this issue 3 years ago • 1 comments

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.

caowm avatar Oct 29 '20 02:10 caowm

Have a look at my frok

https://github.com/JensBorrisholt/Delphi-JsonToDelphiClass

I have continued the development. And I'm sure it can handle your JSON

JensBorrisholt avatar Nov 30 '20 19:11 JensBorrisholt