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

Deserializing nested Objects #20

Open
kelalvarez opened this issue Apr 17, 2017 · 5 comments
Open

Deserializing nested Objects #20

kelalvarez opened this issue Apr 17, 2017 · 5 comments

Comments

@kelalvarez
Copy link

I'm currently working on deserializing nested objects within an json object.

It seems like nested objects work when they are arrays, but not when they are singular objects.

For example, the following works:

  @JsonProperty({clazz: Project, name: 'created_projects'})
  projects: Project[] = undefined;

but this does not:

    @JsonProperty({clazz: Picture, name: 'profile_picture'})
    profilePicture: Picture = undefined;

In these examples the underlying data is an array or an object respectively.

@raman-kashyap
Copy link

Any luck with this?

1 similar comment
@shtse8
Copy link

shtse8 commented Oct 18, 2017

Any luck with this?

@raman-kashyap
Copy link

@shtse8 - I ended up using a different library i.e. json2typescript which solved my problem.

@shtse8
Copy link

shtse8 commented Oct 20, 2017

@raman-kashyap same situation here. I am using that one too.

@evergreen-lee-campbell
Copy link

I'm seeing the exact opposite (arrays are not working, but single object properties are).

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

4 participants