)]}'
{
  "commit": "d70b0ece2f208ff99efce87c07f5171617c29a13",
  "tree": "08c57d1c0607e87b76a25fcdf124f4abfc20c6a4",
  "parents": [
    "321a3d6e85e6440b5c753b3fd6a0e028dcc08143"
  ],
  "author": {
    "name": "Leigh McCulloch",
    "email": "leighmcc@gmail.com",
    "time": "Tue Dec 11 05:32:50 2018 +0000"
  },
  "committer": {
    "name": "Ian Lance Taylor",
    "email": "iant@golang.org",
    "time": "Wed Dec 12 14:18:06 2018 +0000"
  },
  "message": "encoding/xml, encoding/json: docs and examples using custom marshalers\n\nBoth the encoding/xml and encoding/json packages support custom\nmarshalers for JSON and XML, as well as the basic encoding.TextMarshaler\nand encoding.TextUnmarshaler interfaces, but the docs and examples for\nthese are missing.\n\nThere are docs for how to use encoding.TextMarshaler and\nencoding.TextUnmarshaler in encoding/json, but not encoding/xml. There\nare no examples for how to use them with either json or xml. This commit\nincludes docs for encoding/xml and examples for both encoding/json and\nencoding/xml.\n\nThere is an example using custom marshalers MarshalJSON and\nUnmarshalJSON in encoding/json, but not MarshalXML and UnmarshalXML in\nencoding/json. These docs are more so necessary for encoding/xml because\nthe complexities of XML documents is significantly greater than JSON\ndocuments which more often leads to the need for custom marshaling. The\nencoding/json package includes an example of how to write a custom\nmarshaler, and this commit includes the same example for the xml\npackage.\n\nAll examples are mirrored off the existing custom marshaler example in\nencoding/json.\n\nFixes #6859\n\nChange-Id: Ic93abc27c0b4d5e48dea6ede4e20b1bedca4ab39\nReviewed-on: https://go-review.googlesource.com/c/76350\nRun-TryBot: Ian Lance Taylor \u003ciant@golang.org\u003e\nTryBot-Result: Gobot Gobot \u003cgobot@golang.org\u003e\nReviewed-by: Ian Lance Taylor \u003ciant@golang.org\u003e\n",
  "tree_diff": [
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "04c7813b2678355a68fe9be74a7424bb78248050",
      "new_mode": 33188,
      "new_path": "src/encoding/json/example_text_marshaling_test.go"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "9f9e801e74ecad91d55213ef136e43ec5aad7714",
      "new_mode": 33188,
      "new_path": "src/encoding/xml/example_marshaling_test.go"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "2549cb16ae54f9476aeb55260b20e441cb8fa731",
      "new_mode": 33188,
      "new_path": "src/encoding/xml/example_text_marshaling_test.go"
    },
    {
      "type": "modify",
      "old_id": "d393d0610bf60fa22c2c88e9aba2a97472fe1163",
      "old_mode": 33188,
      "old_path": "src/encoding/xml/marshal.go",
      "new_id": "add5ece78211f101c63e29514fbdd9d3e360326f",
      "new_mode": 33188,
      "new_path": "src/encoding/xml/marshal.go"
    },
    {
      "type": "modify",
      "old_id": "36c7ba63111082ba3e1e0297757c783ec4f74121",
      "old_mode": 33188,
      "old_path": "src/encoding/xml/read.go",
      "new_id": "12102bc804e4e0334d4b65603a32f3d63fbabfce",
      "new_mode": 33188,
      "new_path": "src/encoding/xml/read.go"
    }
  ]
}
