Add JSON view for trees

Sample output:

$ curl -s 'http://localhost:8080/gitiles/+/master/lib?format=JSON'
)]}'
{
  "entries": [
    {
      "mode": 33188,
      "type": "blob",
      "id": "abed91637554aa423806eb199958d007a6b72510",
      "name": "BUCK"
    },
    {
      "mode": 16384,
      "type": "tree",
      "id": "1c0b739a3b621f4d004daf16eed83121c69c1ff0",
      "name": "guice"
    },
    {
      "mode": 16384,
      "type": "tree",
      "id": "0337998ca4c09f2956c2f21497d7324027874139",
      "name": "jetty"
    },
    {
      "mode": 16384,
      "type": "tree",
      "id": "84a4af5fd7a250365d82855a8d34364f7afb9797",
      "name": "jgit"
    },
    {
      "mode": 16384,
      "type": "tree",
      "id": "e238f03c6d6d08426e335c9a30d06e0db28e9db3",
      "name": "slf4j"
    }
  ]
}

Change-Id: I38e37fed4f0d529bc319f637c90b2d0ce4519eda
3 files changed