1
0
mirror of https://github.com/json-iterator/go.git synced 2025-06-18 22:57:33 +02:00

read to interface{}

This commit is contained in:
Tao Wen
2017-01-21 16:09:38 +08:00
parent 928bc4ce72
commit 1d29fa38ef
8 changed files with 71 additions and 40 deletions

View File

@ -59,6 +59,12 @@ func Test_read_exotic_string(t *testing.T) {
}
}
func Test_read_string_via_read(t *testing.T) {
should := require.New(t)
iter := ParseString(`"hello"`)
should.Equal("hello", iter.Read())
}
func Test_write_string(t *testing.T) {
should := require.New(t)
buf := &bytes.Buffer{}