# Invalid input JSON - Cannot deserialize value of type \`java.util.LinkedHashMap\`

**URL:** <https://community.hubspot.com/t/invalid-input-json-cannot-deserialize-value-of-type-java-util-linkedhashmap/69550>\
**Category:** APIs & Integrations\
**Tags:** php\
**Created:** [November 18, 2022, 10:58am UTC](https://community.hubspot.com/t/invalid-input-json-cannot-deserialize-value-of-type-java-util-linkedhashmap/69550 "2022-11-18T10:58:28Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![LSeall](https://avatars.discourse-cdn.com/v4/letter/l/4da419/32.png) [@LSeall](https://community.hubspot.com/u/LSeall)\
**Post date:** [November 21, 2022, 9:17am UTC](https://community.hubspot.com/t/invalid-input-json-cannot-deserialize-value-of-type-java-util-linkedhashmap/69550/5 "2022-11-21T09:17:07Z")

</div>

Thanks for this. Changing the array structure sorted it. This is what I used in case it helps others.

**$arr = array(**  
**‘properties’ =\> array(**  
**‘company’ =\> ‘Biglytics’,**  
**‘email’ =\> ‘bcooper@biglytics.net’,**  
**‘firstname’ =\> ‘Bryan’,**  
**‘lastname’ =\> ‘Cooper’,**  
**‘phone’ =\> ‘(877) 929-0687’,**  
**‘website’ =\> ‘[biglytics.net](http://biglytics.net)’**  
**)**  
**);**  
**$post\_json = json\_encode($arr);**

---

_[View the full topic](https://community.hubspot.com/t/invalid-input-json-cannot-deserialize-value-of-type-java-util-linkedhashmap/69550)._
