groovy-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Keegan Witt <keeganw...@gmail.com>
Subject Re: JsonOutput and pretty print
Date Tue, 04 Aug 2015 17:58:09 GMT
Actually, thinking about this a little more, my suggestion would introduce
an inconsistency for JsonOutput.prettyPrint(String).  All the other
prettyPrints would mean convert to JSON, then pretty print, but
prettyPrint(String) would either assume the String is JSON, or have to
include an extra parameter to communicate whether it is already JSON or
not.  If we were going to do this, your idea is actually better.

-Keegan


On Tue, Aug 4, 2015 at 1:05 PM, Keegan Witt <keeganwitt@gmail.com> wrote:

> If I were to build JsonOutput from scratch today, I'd probably do as you
> propose.  But since we've already gone down the road of a separate method
> for pretty printing, maybe it'd be more consistent to leave
> JsonOutput.toJson() alone and instead add matching JsonOutput.prettyPrint()
> methods.  What's everyone else think?
>
> -Keegan
>
> On Tue, Aug 4, 2015 at 2:21 AM, Esteban GĂ­nez <eginez@gmail.com> wrote:
>
>> JsonOutput
>
>
>

Mime
View raw message