github.com/segmentio/encoding@v0.4.0/json/bugs/issue84/main_test.go (about)

     1  package main
     2  
     3  import (
     4  	"testing"
     5  
     6  	"github.com/segmentio/encoding/json"
     7  )
     8  
     9  type Foo struct {
    10  	Source struct {
    11  		Table string
    12  	}
    13  }
    14  
    15  func TestUnmarshal(t *testing.T) {
    16  	input := []byte(`{"source": {"table": "1234567"}}`)
    17  	r := &Foo{}
    18  	json.Unmarshal(input, r)
    19  }