(t *testing.T)
| 9 | ) |
| 10 | |
| 11 | func TestDecodeJSON(t *testing.T) { |
| 12 | in := ` |
| 13 | { |
| 14 | "glossary":{ |
| 15 | "title":"example glossary", |
| 16 | "GlossDiv":{ |
| 17 | "title":"S", |
| 18 | "GlossList":{ |
| 19 | "GlossEntry":{ |
| 20 | "ID":"SGML", |
| 21 | "SortAs":"SGML", |
| 22 | "GlossTerm":"Standard Generalized Markup Language", |
| 23 | "Acronym":"SGML", |
| 24 | "Abbrev":"ISO 8879:1986", |
| 25 | "GlossDef":{ |
| 26 | "para":"A meta-markup language, used to create markup languages such as DocBook.", |
| 27 | "GlossSeeAlso":[ |
| 28 | "GML", |
| 29 | "XML" |
| 30 | ] |
| 31 | }, |
| 32 | "GlossSee":"markup" |
| 33 | } |
| 34 | } |
| 35 | } |
| 36 | } |
| 37 | } |
| 38 | ` |
| 39 | expected := sops.TreeBranch{ |
| 40 | sops.TreeItem{ |
| 41 | Key: "glossary", |
| 42 | Value: sops.TreeBranch{ |
| 43 | sops.TreeItem{ |
| 44 | Key: "title", |
| 45 | Value: "example glossary", |
| 46 | }, |
| 47 | sops.TreeItem{ |
| 48 | Key: "GlossDiv", |
| 49 | Value: sops.TreeBranch{ |
| 50 | sops.TreeItem{ |
| 51 | Key: "title", |
| 52 | Value: "S", |
| 53 | }, |
| 54 | sops.TreeItem{ |
| 55 | Key: "GlossList", |
| 56 | Value: sops.TreeBranch{ |
| 57 | sops.TreeItem{ |
| 58 | Key: "GlossEntry", |
| 59 | Value: sops.TreeBranch{ |
| 60 | sops.TreeItem{ |
| 61 | Key: "ID", |
| 62 | Value: "SGML", |
| 63 | }, |
| 64 | sops.TreeItem{ |
| 65 | Key: "SortAs", |
| 66 | Value: "SGML", |
| 67 | }, |
| 68 | sops.TreeItem{ |
nothing calls this directly
no test coverage detected