Re: toJSON() and the replacer, also pretty printing
- --- In email@example.com, "Tyler Close" <tyler.close@...> wrote:
>I corrected the comment.
> There's a small inconsistency between the current documentation for
> JSON.stringify() and the actual implementation (v. 2008-07-09).
> I'd also prefer that no newline character be inserted between elementsPretty is in the eye of the beholder. There are uses that need
> in an array. When using the Firebug "Net" pane, the current
> implementation requires scrolling for even short payloads. I like
> having the newline between object members though. For some reason, my
> arrays tend to be longer lists of literals, whereas object members are
> more likely to be objects.
newlines in arrays. I don't want to complicate the calling sequence or
complicate the code. What do you suggest?