2 Replies Latest reply on Jul 8, 2015 6:56 AM by valter.pereiragoncalves

    how to parse json error

    kumar-ror

      Hi

       

      I am using Jive REST API v3.12 → Person service

       

      and I am trying to get person details via email and after firing query I am getting response like and I am unable to parse it, so could you please help me how can I parse it.

       

      JSON::ParserError Exception: 795: unexpected token at 'throw 'allowIllegalResourceCall is false.';

      {

        "id" : "2032",

        "resources" : {

          "reports" : {

            "allowed" : [ "GET" ],

            "ref" : "https://offlabs.jiveon.com/api/core/v3/people/2032/@reports"

          },

          "followingIn" : {

            "allowed" : [ "POST", "GET" ],

            "ref" : "https://offlabs.jiveon.com/api/core/v3/people/2032/followingIn"

          },

          "images" : {

            "allowed" : [ "POST", "GET" ],

            "ref" : "https://offlabs.jiveon.com/api/core/v3/people/2032/images"

          },

          "activity" : {

            "allowed" : [ "GET" ],

            "ref" : "https://offlabs.jiveon.com/api/core/v3/people/2032/activities"

          },

          "manager" : {

            "allowed" : [ "GET" ],

            "ref" : "https://offlabs.jiveon.com/api/core/v3/people/2032/@manager"

          },

          "social" : {

            "allowed" : [ "GET" ],

            "ref" : "https://offlabs.jiveon.com/api/core/v3/people/2032/@social"

          },

          "roles" : {

            "allowed" : [ "GET" ],

            "ref" : "https://offlabs.jiveon.com/api/core/v3/people/2032/roles"

          },

          "streams" : {

            "allowed" : [ "POST", "GET" ],

            "ref" : "https://offlabs.jiveon.com/api/core/v3/people/2032/streams"

          },

          "recognition" : {

            "allowed" : [ "GET" ],

            "ref" : "https://offlabs.jiveon.com/api/core/v3/people/2032/@recognition"

          },

          "trendingContent" : {

            "allowed" : [ "GET" ],

            "ref" : "https://offlabs.jiveon.com/api/core/v3/people/2032/@trendingContent"

          },

          "trendingPlaces" : {

            "allowed" : [ "GET" ],

            "ref" : "https://offlabs.jiveon.com/api/core/v3/people/2032/@trendingPlaces"

          },

          "avatar" : {

            "allowed" : [ "PUT", "GET" ],

            "ref" : "https://offlabs.jiveon.com/api/core/v3/people/2032/avatar?a=1039"

          },

          "followers" : {

            "allowed" : [ "GET" ],

            "ref" : "https://offlabs.jiveon.com/api/core/v3/people/2032/@followers"

          },

          "pages" : {

            "allowed" : [ "POST", "GET" ],

            "ref" : "https://offlabs.jiveon.com/api/core/v3/people/2032/pages"

          },

          "colleagues" : {

            "allowed" : [ "GET" ],

            "ref" : "https://offlabs.jiveon.com/api/core/v3/people/2032/@colleagues"

          },

          "following" : {

            "allowed" : [ "GET" ],

            "ref" : "https://offlabs.jiveon.com/api/core/v3/people/2032/@following"

          },

          "members" : {

            "allowed" : [ "GET" ],

            "ref" : "https://offlabs.jiveon.com/api/core/v3/members/people/2032"

          },

          "self" : {

            "allowed" : [ "DELETE", "PUT", "GET" ],

            "ref" : "https://offlabs.jiveon.com/api/core/v3/people/2032"

          },

          "html" : {

            "allowed" : [ "GET" ],

            "ref" : "https://offlabs.jiveon.com/people/test1%40mailinator.com"

          },

          "securityGroups" : {

            "allowed" : [ "GET" ],

            "ref" : "https://offlabs.jiveon.com/api/core/v3/people/2032/securityGroups"

          },

          "extprops" : {

            "allowed" : [ "DELETE", "POST", "GET" ],

            "ref" : "https://offlabs.jiveon.com/api/core/v3/people/2032/extprops"

          }

        },

        "followerCount" : 0,

        "followed" : false,

        "published" : "2015-07-06T19:38:25.155+0000",

        "updated" : "2015-07-06T19:41:05.192+0000",

        "displayName" : "khangar rajeev",

        "mentionName" : "khangar rajeev",

        "emails" : [ {

          "jive_label" : "Email",

          "primary" : true,

          "type" : "work",

          "value" : "test1@mailinator.com",

          "jive_displayOrder" : 3,

          "jive_summaryDisplayOrder" : 2,

          "jive_showSummaryLabel" : true

        } ],

        "followingCount" : 0,

        "directReportCount" : 0,

        "jive" : {

          "enabled" : true,

          "external" : false,

          "externalIdentities" : [ ],

          "federated" : false,

          "lastProfileUpdate" : "2015-07-06T19:41:05.191+0000",

          "level" : {

            "imageURI" : "https://offlabs.jiveon.com/api/core/v3/images/status/statusicon-47.gif",

            "name" : "Newbie",

            "points" : 0

          },

          "locale" : "en_US",

          "externalContributor" : false,

          "sendable" : true,

          "timeZone" : "America/Los_Angeles",

          "username" : "test1@mailinator.com",

          "visible" : true,

          "status" : "registered"

        },

        "name" : {

          "familyName" : "rajeev",

          "formatted" : "khangar rajeev",

          "givenName" : "khangar"

        },

        "thumbnailId" : "1039",

        "thumbnailUrl" : "https://offlabs.jiveon.com/api/core/v3/people/2032/avatar?a=1039",

        "type" : "person",

        "typeCode" : 3

      }'

       

      Thanks

      Kumar