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

PRETTY_PRINT_OUTPUT with composer doesn't work #38

Closed
weizhu-us opened this issue Feb 24, 2016 · 2 comments
Closed

PRETTY_PRINT_OUTPUT with composer doesn't work #38

weizhu-us opened this issue Feb 24, 2016 · 2 comments
Milestone

Comments

@weizhu-us
Copy link

PRETTY_PRINT_OUTPUT with composer doesn't work. I tried both 2.7.1 and 2.5. It doesn't do the pretty print
code:

 String json = JSON.std
                    .with(JSON.Feature.PRETTY_PRINT_OUTPUT)
                    .composeString()
                    .startObject()
                    .put("a", 1)
                    .startArrayField("arr")
                    .add(1).add(2).add(3)
                    .end()
                    .startObjectField("ob")
                    .put("x", 3)
                    .put("y", 4)
                    .startArrayField("args").add("none").end()
                    .end()
                    .put("last", true)
                    .end()
                    .finish();
 System.out.println(json);

Output:
{"a":1,"arr":[1,2,3],"ob":{"x":3,"y":4,"args":["none"]},"last":true}

@cowtowncoder
Copy link
Member

Ah. This is for composer, explains why it wasn't getting tested.

@cowtowncoder cowtowncoder added this to the 2.3.1 milestone Mar 16, 2016
@cowtowncoder cowtowncoder modified the milestones: 2.3.1, 2.7.3 Mar 16, 2016
@cowtowncoder
Copy link
Member

Thank you for reporting this: fixed for 2.7.3.

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