• Russ Cox's avatar
    undo CL 11161044 / ba455262a9db · 4419d7e5
    Russ Cox authored
    I want to think more carefully about this.
    
    We put this in because Marshal encoded named []byte but Unmarshal rejected them.
    And we noticed that Marshal's behavior was undocumented so we documented it.
    But I am starting to think the docs and Unmarshal were correct and Marshal's
    behavior was the problem.
    
    Rolling back to give us more time to think.
    
    ««« original CL description
    json: unmarshal types that are byte slices.
    
    The json package cheerfully would marshal
    
            type S struct {
                    IP net.IP
            }
    
    but would give an error when unmarshalling.  This change allows any
    type whose concrete type is a byte slice to be unmarshalled from a
    string.
    
    Fixes #5086.
    
    R=golang-dev, rsc
    CC=golang-dev
    https://golang.org/cl/11161044
    
    »»»
    
    R=golang-dev, r
    CC=golang-dev
    https://golang.org/cl/11042046
    4419d7e5
Name
Last commit
Last update
..
testdata Loading commit data...
bench_test.go Loading commit data...
decode.go Loading commit data...
decode_test.go Loading commit data...
encode.go Loading commit data...
encode_test.go Loading commit data...
example_test.go Loading commit data...
indent.go Loading commit data...
scanner.go Loading commit data...
scanner_test.go Loading commit data...
stream.go Loading commit data...
stream_test.go Loading commit data...
tagkey_test.go Loading commit data...
tags.go Loading commit data...
tags_test.go Loading commit data...