cxf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Manula Thantriwatte <manulachathur...@gmail.com>
Subject Error in unmarshalling after removing root element from input json
Date Wed, 12 Mar 2014 12:09:47 GMT
Hi All,

I want to parse the JSON string which haven't root element. When I google I
found there is a configurations to dropRootElement. This is work for me for
the output json. But it didn't work for the input json. How can I solve
this problem. Here I attach my sample JSON file.

{
  "ref": "refs/heads/master",
  "after": "a6abbdeaf4b7b29b646501583d408f16a033a975",
  "before": "244d9eeeb5de42ed078bc469d82a99106de28d87",
  "created": false,
  "deleted": false,
  "forced": false,
  "compare": "https://github.com/manulachathurika/stratos2-test/compare/244d9eeeb5de...a6abbdeaf4b7",
  "commits": [
    {
      "id": "a6abbdeaf4b7b29b646501583d408f16a033a975",
      "distinct": true,
      "message": "Test",
      "timestamp": "2014-03-12T14:04:31+05:30",
      "url": "https://github.com/manulachathurika/stratos2-test/commit/a6abbdeaf4b7b29b646501583d408f16a033a975",
      "author": {
        "name": "Manula Thantriwatte",
        "email": "manula@apache.org",
        "username": "manulachathurika"
      },
      "committer": {
        "name": "Manula Thantriwatte",
        "email": "manula@apache.org",
        "username": "manulachathurika"
      },
      "added": [

      ],
      "removed": [

      ],
      "modified": [
        "www/sleep.php"
      ]
    }
  ],
  "head_commit": {
    "id": "a6abbdeaf4b7b29b646501583d408f16a033a975",
    "distinct": true,
    "message": "Test",
    "timestamp": "2014-03-12T14:04:31+05:30",
    "url": "https://github.com/manulachathurika/stratos2-test/commit/a6abbdeaf4b7b29b646501583d408f16a033a975",
    "author": {
      "name": "Manula Thantriwatte",
      "email": "manula@apache.org",
      "username": "manulachathurika"
    },
    "committer": {
      "name": "Manula Thantriwatte",
      "email": "manula@apache.org",
      "username": "manulachathurika"
    },
    "added": [

    ],
    "removed": [

    ],
    "modified": [
      "www/sleep.php"
    ]
  },
  "repository": {
    "id": 17658115,
    "name": "stratos2-test",
    "url": "https://github.com/manulachathurika/stratos2-test",
    "description": "Stratos2 Test",
    "watchers": 0,
    "stargazers": 0,
    "forks": 0,
    "fork": true,
    "size": 112,
    "owner": {
      "name": "manulachathurika",
      "email": "manulachathurika@gmail.com"
    },
    "private": false,
    "open_issues": 0,
    "has_issues": false,
    "has_downloads": true,
    "has_wiki": true,
    "language": "PHP",
    "created_at": 1394607356,
    "pushed_at": 1394613293,
    "master_branch": "master"
  },
  "pusher": {
    "name": "manulachathurika",
    "email": "manulachathurika@gmail.com"
  }}


I want to get the repository details. In this JSON there isn't root
element. I need to know how to get repository details in this JSON
file.


Thanks !


-- 
Regards,
Manula Thantriwatte.

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message