Rob Santoro
Rob Santoro

Reputation: 382

Creating a deal in PHP using HubSpot 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 when 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 appreciated.

Upvotes: 0

Views: 22

Answers (0)

Related Questions