-
Notifications
You must be signed in to change notification settings - Fork 211
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
Should dhall-json always pretty-print JSON? #716
Comments
Note that if you want to argue for the Unix way there is always the pipe `|
jq .` to pretty print the output.
…On Tue, 27 Nov 2018, 9:56 pm Gabriel Gonzalez ***@***.*** wrote:
I was having difficulty thinking of a use case where a user wouldn't want
to pretty-print the JSON output. I was wondering if we should pretty-print
the output by default
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#716>, or mute the
thread
<https://github.com/notifications/unsubscribe-auth/AABRjhkVhsyON1zj2XxmNZfF1kI8n5lJks5uzbT7gaJpZM4Y2atA>
.
|
I view pretty-printing as ancillary to jq's purpose. If anything, I think jq is an example of why we should do this since jq does not delegate responsibility for pretty printing to another tool |
I don't understand. Jq doesn't care if your input is or isn't pretty printed. However, it is a tool that solves the general problem of "I want this JSON pretty printed". The purpose of dhall-to-json is just to convert Dhall to JSON. Personally I have no feeling either way on the matter though, technically either is an arbitrary choice |
Is the proposal to flip the boolean, or is the proposal to remove it and always pretty print? |
@joneshf: Remove it and always pretty print Note that if I were to o this I'd probably roll this out in two phases:
|
Sorry to comment late if the decision has already been made, the one thing I care about is if the output has newlines or not. Having this be a flag would be useful for me, but otherwise I will use other tools to substitute newlines. |
@justinwoo: The decision hasn't been made, yet! 🙂 I can definitely preserve a newline-free option if you need one |
@justinwoo Let me guess, so that it’s easier to use with ad-hoc perl scripts? ;) |
it's useful for when you work with newline-delimited JSON and other things in general, but yes, this would also help me use jq and perl |
So then the transition can be done in the following phases:
|
This is phase 1 of transitioning to pretty-printing by default, as described here: #716 (comment) This flag allows users who prefer the compact format a smooth migration path
This is phase 1 of transitioning to pretty-printing by default, as described here: #716 (comment) This flag allows users who prefer the compact format a smooth migration path
I'm adding a Hacktoberfest label to this to complete the next step of the transition to make |
Wanted to do something simple and found that:
|
You can alternatively use
I mostly use |
I created pull request. Surely, it's very simple changes. Everything is already done. And I can create one more PR to remove |
I was having difficulty thinking of a use case where a user wouldn't want to pretty-print the JSON output. I was wondering if we should pretty-print the output by default
The text was updated successfully, but these errors were encountered: