Skip to content

Possible to flat json object #242

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

Open
Prototype1 opened this issue Jun 14, 2019 · 0 comments
Open

Possible to flat json object #242

Prototype1 opened this issue Jun 14, 2019 · 0 comments

Comments

@Prototype1
Copy link

Imagine we have some json

{
"id": "Bla",
"name": "x",
"source": {
"id": "2"
}
}

And we wanna have this output:

public class Record{ public String id; public String name; public String sourceId; }

How could we do it? Right now I use constructor mapping with a temporary Source object which then is used to set the consponding String in the Record class but there has to be a better way or?

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

1 participant