(t *testing.T)
| 1614 | } |
| 1615 | |
| 1616 | func TestDecoderObjectDecoderAPI(t *testing.T) { |
| 1617 | json := `{ |
| 1618 | "test": 245, |
| 1619 | "test2": 246, |
| 1620 | "test3": "string", |
| 1621 | "test4": "complex string with spaces and some slashes\"", |
| 1622 | "test5": -1.15657654376543, |
| 1623 | "testNull": null, |
| 1624 | "testArr": [ |
| 1625 | { |
| 1626 | "test": 245, |
| 1627 | "test2": 246 |
| 1628 | }, |
| 1629 | { |
| 1630 | "test": 245, |
| 1631 | "test2": 246 |
| 1632 | } |
| 1633 | ], |
| 1634 | "testSubObj": { |
| 1635 | "test": 121, |
| 1636 | "test2": 122, |
| 1637 | "testNull": null, |
| 1638 | "testSubSubObj": { |
| 1639 | "test": 150, |
| 1640 | "testNull": null |
| 1641 | }, |
| 1642 | "testSubSubObj2": { |
| 1643 | "test": 150 |
| 1644 | }, |
| 1645 | "test3": "string" |
| 1646 | "testNull": null, |
| 1647 | }, |
| 1648 | "testSubObj2": { |
| 1649 | "test": 122, |
| 1650 | "test3": "string" |
| 1651 | "testSubSubObj": { |
| 1652 | "test": 151 |
| 1653 | }, |
| 1654 | "test2": 123 |
| 1655 | } |
| 1656 | }` |
| 1657 | v := &TestObj{} |
| 1658 | dec := NewDecoder(strings.NewReader(json)) |
| 1659 | err := dec.DecodeObject(v) |
| 1660 | assertResult(t, v, err) |
| 1661 | } |
| 1662 | |
| 1663 | type ReadCloser struct { |
| 1664 | json []byte |
nothing calls this directly
no test coverage detected
searching dependent graphs…