<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Invalid input JSON - Cannot deserialize value of type `java.util.LinkedHashMap` in APIs &amp; Integrations</title>
    <link>https://community.hubspot.com/t5/APIs-Integrations/Invalid-input-JSON-Cannot-deserialize-value-of-type-java-util/m-p/720229#M58828</link>
    <description>&lt;P&gt;Trying to create a contact with php, using the example code from the hubspot docs but getting the following error -&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;string(269) "{"status":"error","message":"Invalid input JSON on line 1, column 15: Cannot deserialize value of type `java.util.LinkedHashMap&amp;lt;java.lang.string,java.lang.string&amp;gt;` from Array value (token `JsonToken.START_ARRAY`)","correlationId":"f8d785e4-68c0-4860-b1e6-4ff977c053c1"}"&amp;lt;/java.lang.string,java.lang.string&amp;gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is my code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;$arr = array(&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&amp;nbsp; 'properties' =&amp;gt; array(&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; array(&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 'property' =&amp;gt; 'email',&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 'value' =&amp;gt; 'apitest@hubspot.com'&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; )&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp;)&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;);&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;$post_json = json_encode($arr);&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;$accesstoken = "*********************************";&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;$headers = [&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;'Content-Type: application/json',&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;'Authorization: Bearer ' . $accesstoken,&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;];&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;$curl = curl_init();&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;curl_setopt($curl, CURLOPT_HTTPHEADER, $headers);&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;curl_setopt($curl, CURLOPT_POST, true);&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;curl_setopt($curl, CURLOPT_POSTFIELDS, $post_json);&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;curl_setopt($curl, CURLOPT_URL, '&lt;A href="https://api.hubapi.com/crm/v3/objects/contacts" target="_blank"&gt;https://api.hubapi.com/crm/v3/objects/contacts&lt;/A&gt;');&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;$contacts = curl_exec($curl);&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;curl_close($curl);&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;var_dump($contacts);&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any ideas?&lt;/P&gt;</description>
    <pubDate>Fri, 18 Nov 2022 10:58:28 GMT</pubDate>
    <dc:creator>LSeall</dc:creator>
    <dc:date>2022-11-18T10:58:28Z</dc:date>
    <item>
      <title>Invalid input JSON - Cannot deserialize value of type `java.util.LinkedHashMap`</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Invalid-input-JSON-Cannot-deserialize-value-of-type-java-util/m-p/720229#M58828</link>
      <description>&lt;P&gt;Trying to create a contact with php, using the example code from the hubspot docs but getting the following error -&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;string(269) "{"status":"error","message":"Invalid input JSON on line 1, column 15: Cannot deserialize value of type `java.util.LinkedHashMap&amp;lt;java.lang.string,java.lang.string&amp;gt;` from Array value (token `JsonToken.START_ARRAY`)","correlationId":"f8d785e4-68c0-4860-b1e6-4ff977c053c1"}"&amp;lt;/java.lang.string,java.lang.string&amp;gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is my code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;$arr = array(&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&amp;nbsp; 'properties' =&amp;gt; array(&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; array(&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 'property' =&amp;gt; 'email',&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 'value' =&amp;gt; 'apitest@hubspot.com'&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; )&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp;)&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;);&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;$post_json = json_encode($arr);&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;$accesstoken = "*********************************";&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;$headers = [&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;'Content-Type: application/json',&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;'Authorization: Bearer ' . $accesstoken,&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;];&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;$curl = curl_init();&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;curl_setopt($curl, CURLOPT_HTTPHEADER, $headers);&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;curl_setopt($curl, CURLOPT_POST, true);&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;curl_setopt($curl, CURLOPT_POSTFIELDS, $post_json);&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;curl_setopt($curl, CURLOPT_URL, '&lt;A href="https://api.hubapi.com/crm/v3/objects/contacts" target="_blank"&gt;https://api.hubapi.com/crm/v3/objects/contacts&lt;/A&gt;');&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;$contacts = curl_exec($curl);&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;curl_close($curl);&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;var_dump($contacts);&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any ideas?&lt;/P&gt;</description>
      <pubDate>Fri, 18 Nov 2022 10:58:28 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Invalid-input-JSON-Cannot-deserialize-value-of-type-java-util/m-p/720229#M58828</guid>
      <dc:creator>LSeall</dc:creator>
      <dc:date>2022-11-18T10:58:28Z</dc:date>
    </item>
    <item>
      <title>Re: Invalid input JSON - Cannot deserialize value of type `java.util.LinkedHashMap`</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Invalid-input-JSON-Cannot-deserialize-value-of-type-java-util/m-p/720633#M58870</link>
      <description>&lt;P&gt;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/479204"&gt;@LSeall&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hi.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Input parameter format might be wrong.&lt;/P&gt;&lt;P&gt;How about this?&lt;/P&gt;&lt;LI-CODE lang="php"&gt;$arr = array(
  'properties' =&amp;gt; array(
      'email' =&amp;gt; 'apitest@hubspot.com'
   )
);&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Sat, 19 Nov 2022 12:04:50 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Invalid-input-JSON-Cannot-deserialize-value-of-type-java-util/m-p/720633#M58870</guid>
      <dc:creator>skimura</dc:creator>
      <dc:date>2022-11-19T12:04:50Z</dc:date>
    </item>
    <item>
      <title>Re: Invalid input JSON - Cannot deserialize value of type `java.util.LinkedHashMap`</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Invalid-input-JSON-Cannot-deserialize-value-of-type-java-util/m-p/720809#M58876</link>
      <description>&lt;P&gt;I am having the same problem. My code is nearly identical. I did try with more values in the array though.&lt;/P&gt;&lt;P&gt;(company, email, firstname, lastname, phone, message)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is code that I'm attempting to migrate from the old API to the newer API (v3) with a private app.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The status code which is returned is: 400&lt;/P&gt;&lt;P&gt;The response is:&amp;nbsp;&amp;nbsp;{"status":"error","message":"Invalid input JSON on line 1, column 15:&lt;BR /&gt;Cannot deserialize value of type `java.util.LinkedHashMap&amp;lt;java.lang.String,java.lang.String&amp;gt;`&lt;BR /&gt;from Array value (token `JsonToken.START_ARRAY`)",&lt;BR /&gt;"correlationId":"32d18bc4-8bdd-41ca-b296-189f768835df"}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've tried different things, and read through the documentation. I still cannot get this to work. Any guidance is really appreciated!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 21 Nov 2022 01:14:35 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Invalid-input-JSON-Cannot-deserialize-value-of-type-java-util/m-p/720809#M58876</guid>
      <dc:creator>EDash</dc:creator>
      <dc:date>2022-11-21T01:14:35Z</dc:date>
    </item>
    <item>
      <title>Re: Invalid input JSON - Cannot deserialize value of type `java.util.LinkedHashMap`</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Invalid-input-JSON-Cannot-deserialize-value-of-type-java-util/m-p/720850#M58884</link>
      <description>&lt;P&gt;I understand this better now ... skimura was on the right track.&lt;/P&gt;&lt;P&gt;If you look at the v3 documentation, you'll see the JSON is different than it was in v1.&lt;/P&gt;&lt;P&gt;You need to modify the code used to generate $arr. It no longer has property &amp;amp; value.&lt;/P&gt;</description>
      <pubDate>Mon, 21 Nov 2022 04:45:54 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Invalid-input-JSON-Cannot-deserialize-value-of-type-java-util/m-p/720850#M58884</guid>
      <dc:creator>EDash</dc:creator>
      <dc:date>2022-11-21T04:45:54Z</dc:date>
    </item>
    <item>
      <title>Re: Invalid input JSON - Cannot deserialize value of type `java.util.LinkedHashMap`</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Invalid-input-JSON-Cannot-deserialize-value-of-type-java-util/m-p/720903#M58892</link>
      <description>&lt;P&gt;Thanks for this.&amp;nbsp; Changing the array structure sorted it.&amp;nbsp; This is what I used in case it helps others.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;$arr = array(&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp;'properties' =&amp;gt; array(&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp;'company' =&amp;gt; 'Biglytics',&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp;'email' =&amp;gt; 'bcooper@biglytics.net',&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp;'firstname' =&amp;gt; 'Bryan',&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp;'lastname' =&amp;gt; 'Cooper',&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp;'phone' =&amp;gt; '(877) 929-0687',&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp;'website' =&amp;gt; 'biglytics.net'&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;);&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;$post_json = json_encode($arr);&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 21 Nov 2022 09:17:07 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Invalid-input-JSON-Cannot-deserialize-value-of-type-java-util/m-p/720903#M58892</guid>
      <dc:creator>LSeall</dc:creator>
      <dc:date>2022-11-21T09:17:07Z</dc:date>
    </item>
    <item>
      <title>Re: Invalid input JSON - Cannot deserialize value of type `java.util.LinkedHashMap`</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Invalid-input-JSON-Cannot-deserialize-value-of-type-java-util/m-p/842702#M67031</link>
      <description>&lt;P&gt;I believe that the v3 documentation is wrong. It states that updating a contact requires a properties object, not a properties array.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="johnbonds_1-1693427706607.png" style="width: 400px;"&gt;&lt;img src="https://community.hubspot.com/t5/image/serverpage/image-id/98042i335336982572EBF4/image-size/medium?v=v2&amp;amp;px=400" role="button" title="johnbonds_1-1693427706607.png" alt="johnbonds_1-1693427706607.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 30 Aug 2023 20:36:04 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Invalid-input-JSON-Cannot-deserialize-value-of-type-java-util/m-p/842702#M67031</guid>
      <dc:creator>johnbonds</dc:creator>
      <dc:date>2023-08-30T20:36:04Z</dc:date>
    </item>
  </channel>
</rss>

