Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Object can't be converted from Json array #17

Open
caowm opened this issue Oct 29, 2020 · 1 comment
Open

Object can't be converted from Json array #17

caowm opened this issue Oct 29, 2020 · 1 comment

Comments

@caowm
Copy link

caowm commented Oct 29, 2020

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 caowm changed the title Json array can't be converted Object can't be converted from Json array Oct 29, 2020
@JensBorrisholt
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants