# Invalid input JSON on line 1, column 15: Cannot deserialize value of type \`java.util.LinkedHashMap\<j

**URL:** <https://community.hubspot.com/t/invalid-input-json-on-line-1-column-15-cannot-deserialize-value-of-type-java-util-linkedhashmap-j/87718>\
**Category:** APIs & Integrations\
**Tags:** starter\
**Created:** [August 17, 2023, 12:42pm UTC](https://community.hubspot.com/t/invalid-input-json-on-line-1-column-15-cannot-deserialize-value-of-type-java-util-linkedhashmap-j/87718 "2023-08-17T12:42:57Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![malayan](https://avatars.discourse-cdn.com/v4/letter/m/6f9a4e/32.png) [@malayan](https://community.hubspot.com/u/malayan)\
**Post date:** [August 17, 2023, 12:42pm UTC](https://community.hubspot.com/t/invalid-input-json-on-line-1-column-15-cannot-deserialize-value-of-type-java-util-linkedhashmap-j/87718/1 "2023-08-17T12:42:57Z")

</div>

- Property Type

 ![malayan_0-1692276033117.png](https://d2qpr2jzcazej7.cloudfront.net/original/3X/f/0/f07c0159059fe809731c8b4d828fcd8726d6788a.png)

- Property to update through API

 ![malayan_1-1692276102038.png](https://d2qpr2jzcazej7.cloudfront.net/original/3X/9/3/93089b0135d58ffca8b09154e87aded15b6a6f2c.png)

1. How to update property type “multiple checkbox” through API in Node JS ?

Code:

Spoiler

const data = {  
“properties”: [  
{  
“product\_lines”:[‘Silver’, ‘Gold’]  
}  
]};

const updatedDealInfo = await hubspotClient.crm.deals.basicApi.update(dealId, data, idProperty);  
console.log(JSON.stringify(updatedDealInfo, null, 2));

--- getting below error when trying to update the property ---

Invalid input JSON on line 1, column 15: Cannot deserialize value of type `java.util.LinkedHashMap\<java.lang.String,java.lang.String\>` from Array value (token `JsonToken.START_ARRAY`)’

can someone please help on this ?

---

<div class="post-metadata">

**Author:** ![coldrickjack](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/coldrickjack/32/6684_2.png) [@coldrickjack](https://community.hubspot.com/u/coldrickjack)\
**Post date:** [August 17, 2023, 1:55pm UTC](https://community.hubspot.com/t/invalid-input-json-on-line-1-column-15-cannot-deserialize-value-of-type-java-util-linkedhashmap-j/87718/2 "2023-08-17T13:55:40Z")

</div>

Hey @malayan,

There are a couple of issues with your code. The first one is that your JSON string is wrapped in brackets - “[]” which is causing HubSpot to parse it as an array which it does not expect.

In addition to this when it comes to updating enumeration properties you must include a string separated by a semi-colon. “;”. The code below is an example of how you would update a custom Deal property “Favourite Colour” using the Node Client:

```lia-code-sample
const hubspot = require('@hubspot/api-client');
const hubspotClient = new hubspot.Client({ "accessToken": process.env.HUBSPOTTOKEN });

exports.main = async (event) => {

 const dealId = event.object.objectId;
 const data = {
 "properties": {
 "favourite_colours": 'Red;Green'
 }
 };

 try {
 const apiResponse = await hubspotClient.crm.deals.basicApi.update(dealId, data);
 console.log('SUCCESS: ' + JSON.stringify(apiResponse, null, 2));
 } catch (e) {
 e.message === 'HTTP request failed' ?
 console.error('ERROR: ' + JSON.stringify(e.response, null, 2)) : console.error('ERROR: ' + e)
 }

}

```

Resulting in:

![Screenshot 2023-08-17 at 15.12.15.png](https://d2qpr2jzcazej7.cloudfront.net/original/3X/d/5/d571ad1dda16609206073c29dc249d19e5a12ee9.png)

I believe updating your code to the below will fix your issues:

```lia-code-sample
const data = {
 "properties": {
 "product_lines": 'Silver;Gold'
 }
 };

const updatedDealInfo = await hubspotClient.crm.deals.basicApi.update(dealId, data, idProperty);
console.log(JSON.stringify(updatedDealInfo, null, 2));

```

Hope this helps! 😊

---

<div class="post-metadata">

**Author:** ![malayan](https://avatars.discourse-cdn.com/v4/letter/m/6f9a4e/32.png) [@malayan](https://community.hubspot.com/u/malayan)\
**Post date:** [August 18, 2023, 6:37am UTC](https://community.hubspot.com/t/invalid-input-json-on-line-1-column-15-cannot-deserialize-value-of-type-java-util-linkedhashmap-j/87718/3 "2023-08-18T06:37:25Z")

</div>

Hi @coldrickjack ,

Thanks for the quick response. This was really helpfull.

Instead of lable I used “Internal Value” it worked

const data = {  
“properties”: {  
“product\_lines”: ‘125--Silver;115--Gold’  
}  
};

Thanks @coldrickjack .
