Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(5)

Issue 4678046: code review 4678046: json: encode \n in strings as "\n", not "\u000A"

Can't Edit
Can't Publish+Mail
Start Review
Created:
10 years, 12 months ago by Evan Martin
Modified:
10 years, 12 months ago
Reviewers:
bradfitz
CC:
golang-dev, bradfitz, rsc
Visibility:
Public.

Description

json: encode \r and \n in strings as e.g. "\n", not "\u000A" This is allowed by the JSON spec and is shorter/easier to read.

Patch Set 1 #

Patch Set 2 : diff -r eb3f582c92d5 https://go.googlecode.com/hg/ #

Patch Set 3 : diff -r eb3f582c92d5 https://go.googlecode.com/hg/ #

Total comments: 1

Patch Set 4 : diff -r eb3f582c92d5 https://go.googlecode.com/hg/ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+9 lines, -2 lines) Patch
M src/pkg/json/encode.go View 1 2 3 1 chunk +9 lines, -2 lines 0 comments Download

Messages

Total messages: 6
Evan Martin
Hello golang-dev@googlegroups.com (cc: golang-dev@googlegroups.com), I'd like you to review this change to https://go.googlecode.com/hg/
10 years, 12 months ago (2011-07-09 19:54:39 UTC) #1
bradfitz
http://codereview.appspot.com/4678046/diff/5001/src/pkg/json/encode.go File src/pkg/json/encode.go (right): http://codereview.appspot.com/4678046/diff/5001/src/pkg/json/encode.go#newcode350 src/pkg/json/encode.go:350: } else if b == '\n' { Just \n? ...
10 years, 12 months ago (2011-07-09 20:04:29 UTC) #2
Evan Martin
I added \r for symmetry, and I'll wait for more feedback.
10 years, 12 months ago (2011-07-09 20:43:06 UTC) #3
rsc
\r and \n is good. let's leave \b and \f out. no one cares about ...
10 years, 12 months ago (2011-07-11 06:35:59 UTC) #4
bradfitz
*** Submitted as http://code.google.com/p/go/source/detail?r=81e9259d59df *** json: encode \r and \n in strings as e.g. "\n", ...
10 years, 12 months ago (2011-07-11 14:31:11 UTC) #5
bradfitz
10 years, 12 months ago (2011-07-11 14:31:38 UTC) #6
LGTM

On Sat, Jul 9, 2011 at 1:43 PM, <evan.martin@gmail.com> wrote:

> I added \r for symmetry, and I'll wait for more feedback.
>
>
>
http://codereview.appspot.com/**4678046/<http://codereview.appspot.com/4678046/>
>
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b