6 Replies Latest reply on Jun 29, 2015 9:07 AM by ryanrutan

    A JSON Issue

    lelliott

      When I try to get the information from Jive via

       

          response = self.class.get("/api/core/v3/people/email/#{email}",

       

          {:basic_auth =>  { :username => @username, :password => @password },

           :headers => {'Content-Type' => 'application/json', 'Accept' => 'application/json'}

          })

      Then it returns a error like:

       

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

       

      {

        "id" : "2015",

        "resources" : {

          "reports" : {

            "allowed" : [ "GET" ],

            "ref" : "<jive-instance>/api/core/v3/people/2015/@reports"

          },

          "followingIn" : {

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

            "ref" : "<jive-instance>/api/core/v3/people/2015/followingIn"

          },

          "images" : {

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

            "ref" : "<jive-instance>/api/core/v3/people/2015/images"

          },

          "activity" : {

            "allowed" : [ "GET" ],

            "ref" : "<jive-instance>/api/core/v3/people/2015/activities"

          },

          "manager" : {

            "allowed" : [ "GET" ],

            "ref" : "<jive-instance>/api/core/v3/people/2015/@manager"

          },

          "social" : {

            "allowed" : [ "GET" ],

            "ref" : "<jive-instance>/api/core/v3/people/2015/@social"

          },

          "roles" : {

            "allowed" : [ "GET" ],

            "ref" : "<jive-instance>/api/core/v3/people/2015/roles"

          },

          "streams" : {

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

            "ref" : "<jive-instance>/api/core/v3/people/2015/streams"

          },

          "recognition" : {

            "allowed" : [ "GET" ],

            "ref" : "<jive-instance>/api/core/v3/people/2015/@recognition"

          },

          "trendingContent" : {

            "allowed" : [ "GET" ],

            "ref" : "<jive-instance>/api/core/v3/people/2015/@trendingContent"

          },

          "trendingPlaces" : {

            "allowed" : [ "GET" ],

            "ref" : "<jive-instance>/api/core/v3/people/2015/@trendingPlaces"

          },

          "avatar" : {

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

            "ref" : "<jive-instance>/api/core/v3/people/2015/avatar?a=1020"

          },

          "followers" : {

            "allowed" : [ "GET" ],

            "ref" : "<jive-instance>/api/core/v3/people/2015/@followers"

          },

          "pages" : {

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

            "ref" : "<jive-instance>/api/core/v3/people/2015/pages"

          },

          "colleagues" : {

            "allowed" : [ "GET" ],

            "ref" : "<jive-instance>/api/core/v3/people/2015/@colleagues"

          },

          "following" : {

            "allowed" : [ "GET" ],

            "ref" : "<jive-instance>/api/core/v3/people/2015/@following"

          },

          "members" : {

            "allowed" : [ "GET" ],

            "ref" : "<jive-instance>/api/core/v3/members/people/2015"

          },

          "self" : {

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

            "ref" : "<jive-instance>/api/core/v3/people/2015"

          },

          "html" : {

            "allowed" : [ "GET" ],

            "ref" : "<jive-instance>/people/test1%40mailinator.com"

          },

          "securityGroups" : {

            "allowed" : [ "GET" ],

            "ref" : "<jive-instance>/api/core/v3/people/2015/securityGroups"

          },

          "extprops" : {

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

            "ref" : "<jive-instance>/api/core/v3/people/2015/extprops"

          }

        },

        "followerCount" : 0,

        "followed" : false,

        "published" : "2015-06-27T13:30:29.961+0000",

        "updated" : "2015-06-27T18:51:25.837+0000",

        "displayName" : "first 1001.0",

        "mentionName" : "first 1001.0",

        "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-06-27T18:51:25.835+0000",

          "level" : {

            "imageURI" : "<jive-instance>/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" : "1001.0",

          "formatted" : "first 1001.0",

          "givenName" : "first"

        },

        "thumbnailId" : "1020",

        "thumbnailUrl" : "<jive-instance>/api/core/v3/people/2015/avatar?a=1020",

        "type" : "person",

        "typeCode" : 3

      }'):