<?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 Re: Issue with filters on search API - filters not handling JSON escaped text in APIs &amp; Integrations</title>
    <link>https://community.hubspot.com/t5/APIs-Integrations/Issue-with-filters-on-search-API-filters-not-handling-JSON/m-p/951548#M72329</link>
    <description>&lt;P&gt;I have tried the double "" method and several other methods of pre-encoding the string (including standard escapes and Microsoft based ones) - the issue is at some point the API point takes the "converted" string but it then can not find the deal by name even though it exists.&amp;nbsp; From what I have read it appears that the filter command on HubSpot API searches does not process JSON escape or any other escape method for that matter.&lt;/P&gt;</description>
    <pubDate>Thu, 28 Mar 2024 17:48:42 GMT</pubDate>
    <dc:creator>RReiffer</dc:creator>
    <dc:date>2024-03-28T17:48:42Z</dc:date>
    <item>
      <title>Issue with filters on search API - filters not handling JSON escaped text</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Issue-with-filters-on-search-API-filters-not-handling-JSON/m-p/951433#M72315</link>
      <description>&lt;P&gt;I have been running a search using&amp;nbsp;&lt;/P&gt;&lt;P&gt;/crm/v3/objects/deals/search&lt;/P&gt;&lt;P&gt;and the filter as follows:&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;{&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; "filterGroups":[&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; "filters":[&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; "propertyName": "dealname",&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; "operator": "EQ",&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; "value": "&lt;/SPAN&gt;&lt;SPAN&gt;{{&lt;/SPAN&gt; &lt;SPAN&gt;CTX&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;opp_name&lt;/SPAN&gt; &lt;SPAN&gt;}}&lt;/SPAN&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ]&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; ]&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; }&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Now this works EXCEPT when the variable CTX.opp_name contains a single quote as it will error out.&amp;nbsp; I then changed it so the variable was set this way CTX.opp_name|json_escape.&amp;nbsp; &amp;nbsp;It then runs BUT the search will NOT find anything.&amp;nbsp; It's like the API is ignoring the escaped character and not feeding it to the actual internal search.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;The actual string was as follows:&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;"Test Quote for a 50" TV"&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;The escaped JSON string was&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;"Test Quote for a 50\" TV"&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Now in other areas I can escape the text just fine, just not in the search.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 28 Mar 2024 14:29:35 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Issue-with-filters-on-search-API-filters-not-handling-JSON/m-p/951433#M72315</guid>
      <dc:creator>RReiffer</dc:creator>
      <dc:date>2024-03-28T14:29:35Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with filters on search API - filters not handling JSON escaped text</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Issue-with-filters-on-search-API-filters-not-handling-JSON/m-p/951548#M72329</link>
      <description>&lt;P&gt;I have tried the double "" method and several other methods of pre-encoding the string (including standard escapes and Microsoft based ones) - the issue is at some point the API point takes the "converted" string but it then can not find the deal by name even though it exists.&amp;nbsp; From what I have read it appears that the filter command on HubSpot API searches does not process JSON escape or any other escape method for that matter.&lt;/P&gt;</description>
      <pubDate>Thu, 28 Mar 2024 17:48:42 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Issue-with-filters-on-search-API-filters-not-handling-JSON/m-p/951548#M72329</guid>
      <dc:creator>RReiffer</dc:creator>
      <dc:date>2024-03-28T17:48:42Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with filters on search API - filters not handling JSON escaped text</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Issue-with-filters-on-search-API-filters-not-handling-JSON/m-p/1241220#M86474</link>
      <description>&lt;P&gt;Same exact problem here -- did you find a solution ? Tried many of the same workarounds it sounds like you did.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 13 Jan 2026 20:27:48 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Issue-with-filters-on-search-API-filters-not-handling-JSON/m-p/1241220#M86474</guid>
      <dc:creator>BDeveloper8</dc:creator>
      <dc:date>2026-01-13T20:27:48Z</dc:date>
    </item>
  </channel>
</rss>

