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

ENH: Add JsonContext.toJsonPretty() ... for pretty JSON output of beans and lists of beans #1882

Closed
rbygrave opened this issue Dec 4, 2019 · 1 comment
Assignees
Milestone

Comments

@rbygrave
Copy link
Member

rbygrave commented Dec 4, 2019

This is expected to be used mostly for testing, asserting fetched beans in pretty json form against expected content.

Looking to add a helper method to ebean-test to get pretty json of bean(s) with the option of replacing fields (like id and timestamp fields) for assert equals purposes.

@rbygrave rbygrave added this to the 12.1.6 milestone Dec 4, 2019
@rbygrave rbygrave self-assigned this Dec 4, 2019
@rbygrave
Copy link
Member Author

rbygrave commented Dec 4, 2019

    String listAsJson = DB.json().toJsonPretty(list);

    String beanAsJson = DB.json().toJsonPretty(bean);

rbygrave added a commit that referenced this issue Dec 4, 2019
@rbygrave rbygrave closed this as completed Dec 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant