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

Issue 7181053: code review 7181053: encoding/json: add Decoder.Buffered accessor to get ove... (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
11 years, 3 months ago by bradfitz
Modified:
11 years, 2 months ago
Reviewers:
CC:
golang-dev, adg, rsc
Visibility:
Public.

Description

encoding/json: add Decoder.Buffered accessor to get overread data Otherwise it's impossible to know how much data from the json.Decoder's underlying Reader was actually consumed. The old fix from golang.org/issue/1955 just added docs. This provides an actual mechanism. Update issue 1955

Patch Set 1 #

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

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

Total comments: 7

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

Patch Set 5 : diff -r 921e53d4863c https://go.googlecode.com/hg/ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+31 lines, -0 lines) Patch
M src/pkg/encoding/json/stream.go View 1 2 3 2 chunks +7 lines, -0 lines 0 comments Download
M src/pkg/encoding/json/stream_test.go View 1 2 3 2 chunks +24 lines, -0 lines 0 comments Download

Messages

Total messages: 12
bradfitz
Hello golang-dev@googlegroups.com, I'd like you to review this change to https://go.googlecode.com/hg/
11 years, 3 months ago (2013-01-23 01:08:41 UTC) #1
adg
https://codereview.appspot.com/7181053/diff/3001/src/pkg/encoding/json/stream.go File src/pkg/encoding/json/stream.go (right): https://codereview.appspot.com/7181053/diff/3001/src/pkg/encoding/json/stream.go#newcode62 src/pkg/encoding/json/stream.go:62: // Remaining returns a reader of the buffered data ...
11 years, 3 months ago (2013-01-23 01:25:41 UTC) #2
bradfitz
https://codereview.appspot.com/7181053/diff/3001/src/pkg/encoding/json/stream.go File src/pkg/encoding/json/stream.go (right): https://codereview.appspot.com/7181053/diff/3001/src/pkg/encoding/json/stream.go#newcode62 src/pkg/encoding/json/stream.go:62: // Remaining returns a reader of the buffered data ...
11 years, 3 months ago (2013-01-23 01:27:46 UTC) #3
adg
https://codereview.appspot.com/7181053/diff/3001/src/pkg/encoding/json/stream.go File src/pkg/encoding/json/stream.go (right): https://codereview.appspot.com/7181053/diff/3001/src/pkg/encoding/json/stream.go#newcode62 src/pkg/encoding/json/stream.go:62: // Remaining returns a reader of the buffered data ...
11 years, 3 months ago (2013-01-23 01:39:57 UTC) #4
bradfitz
https://codereview.appspot.com/7181053/diff/3001/src/pkg/encoding/json/stream.go File src/pkg/encoding/json/stream.go (right): https://codereview.appspot.com/7181053/diff/3001/src/pkg/encoding/json/stream.go#newcode62 src/pkg/encoding/json/stream.go:62: // Remaining returns a reader of the buffered data ...
11 years, 3 months ago (2013-01-23 01:49:49 UTC) #5
rsc
I am a little confused about why what's there isn't good enough. That is, why ...
11 years, 3 months ago (2013-01-23 02:55:34 UTC) #6
adg
On 23 January 2013 12:49, <bradfitz@golang.org> wrote: > And we could just return the buffered ...
11 years, 3 months ago (2013-01-23 02:55:35 UTC) #7
bradfitz
Likely I'm stupid and missed that. Will look later. On Jan 22, 2013 6:55 PM, ...
11 years, 3 months ago (2013-01-23 03:19:06 UTC) #8
bradfitz
Russ, there is no TestLimitedBuffering. Maybe you're referring to https://codereview.appspot.com/5623053/ which was never submitted due ...
11 years, 2 months ago (2013-01-23 23:43:07 UTC) #9
bradfitz
Hello golang-dev@googlegroups.com, adg@golang.org, rsc@golang.org (cc: golang-dev@googlegroups.com), Please take another look.
11 years, 2 months ago (2013-01-29 00:25:24 UTC) #10
rsc
LGTM
11 years, 2 months ago (2013-01-29 00:26:25 UTC) #11
bradfitz
11 years, 2 months ago (2013-01-29 00:31:48 UTC) #12
*** Submitted as https://code.google.com/p/go/source/detail?r=6ea4af4a1d5e ***

encoding/json: add Decoder.Buffered accessor to get overread data

Otherwise it's impossible to know how much data from the
json.Decoder's underlying Reader was actually consumed.

The old fix from golang.org/issue/1955 just added docs. This
provides an actual mechanism.

Update issue 1955

R=golang-dev, adg, rsc
CC=golang-dev
https://codereview.appspot.com/7181053
Sign in to reply to this message.

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