APIs & Integrations

rsantoro47
Member

Creating a deal in PHP using API v5.3.0 suddenly errors with DeserializationFeature.FAIL_ON_TRAILING

I know I am using an old version of the PHP API, but I cannot afford the time at the moment or errors it may cause to upgrade to the newer versions.

 

I have had no issues creating deals in the past, using the following code:

 

$result = $this->_HubSpotIntegrator->deals()->create($properties, $associations);

Where  $this->_HubSpotIntegrator is a valid SevenShores\Hubspot\Http\Client class (and other API functions work fine) and $properties is an array setup with each row => 
name ="dealname"
value ="Test"
and $associations is an array with one association: associatedCompanyIds ="#########".
 
This code used to work with no issues, and I changed nothing on my end, and now I recieve the following error message: 
Invalid input JSON on line 1, column 342: Trailing token (of type END_OBJECT) found after value (bound as `com.hubspot.deals.base.DealView`): not allowed as per `DeserializationFeature.FAIL_ON_TRAILING_TOKENS`
 
I do not understand how the JSON string is invalid with the HubSpot class generated it and I do not know what I need to change in order to get this working again.  Any assistance is appreciatrd. 
0 Upvotes
2 Replies 2
Jaycee_Lewis
Community Manager
Community Manager

Creating a deal in PHP using API v5.3.0 suddenly errors with DeserializationFeature.FAIL_ON_TRAILING

Hey, @rsantoro47 👋 Thank you for posting your question. I'd like to invite some of our community members with PHP expertise to the conversation — hey @Teun @stefen @skimura @zach_threadint do you have any suggestions or troubleshooting steps you can recommend to @rsantoro47

 

Thank you! — Jaycee

linkedin

Jaycee Lewis

Developer Community Manager

Community | HubSpot

0 Upvotes
rsantoro47
Member

Creating a deal in PHP using API v5.3.0 suddenly errors with DeserializationFeature.FAIL_ON_TRAILING

Thank you, any help is greatly appreciated.  

0 Upvotes