Lines Matching refs:json
5 package json
21 // One of each JSON kind.
66 // merge two adjacent JSON values.
213 json string
223 {json: `10`, expTokens: []interface{}{float64(10)}},
224 {json: ` [10] `, expTokens: []interface{}{
226 {json: ` [false,10,"b"] `, expTokens: []interface{}{
228 {json: `{ "a": 1 }`, expTokens: []interface{}{
230 {json: `{"a": 1, "b":"3"}`, expTokens: []interface{}{
232 {json: ` [{"a": 1},{"a": 2}] `, expTokens: []interface{}{
237 {json: `{"obj": {"a": 1}}`, expTokens: []interface{}{
240 {json: `{"obj": [{"a": 1}]}`, expTokens: []interface{}{
246 {json: `{ "a": 1 }`, expTokens: []interface{}{
250 {json: ` [ { "a" : 1 } ] `, expTokens: []interface{}{
254 {json: ` [{"a": 1},{"a": 2}] `, expTokens: []interface{}{
259 {json: `{ "obj" : [ { "a" : 1 } ] }`, expTokens: []interface{}{
264 {json: `{"obj": {"a": 1}}`, expTokens: []interface{}{
268 {json: `{"obj": [{"a": 1}]}`, expTokens: []interface{}{
274 {json: ` [{"a": 1} {"a": 2}] `, expTokens: []interface{}{
279 {json: `{ "a" 1 }`, expTokens: []interface{}{
289 dec := NewDecoder(strings.NewReader(tcase.json))
303 t.Errorf("case %v: Expected error %v in %q, but was %v", ci, experr, tcase.json, err)
307 t.Errorf("case %v: Unexpected EOF in %q", ci, tcase.json)
310 t.Errorf("case %v: Unexpected error '%v' in %q", ci, err, tcase.json)
314 t.Errorf(`case %v: %q @ %v expected %T(%v) was %T(%v)`, ci, tcase.json, i, etk, etk, tk, tk)