[Vtigercrm-developers] [API]Problem with '&' in json

Sutharsan J ajstharsan at gmail.com
Mon Apr 19 08:18:19 GMT 2021


Hi

There can't be issue in api as we use it several times, but using cURL. May
be url encoding should be done before json encoding, probably urlencode
each field separately the build json. Did you try that?


Thanks
Sutharsan jeganathan

On Sun, 18 Apr 2021 at 03:38 Sukhdev Mohan <s.mohan at myti.it> wrote:

> Tried that, not working
>
> Il sab 17 apr 2021, 23:57 Joe Bordes <joe at tsolucio.com> ha scritto:
>
>> try url encoding the json string
>>
>>
>> On 17/4/21 23:21, Sukhdev Mohan wrote:
>>
>> Hello All,
>>
>> I’m using pentane data integration and importing data into vtiger v7
>> through rest API’s.
>> I’m doing POST request (form-url-encode) and in the body I’ve this
>> elementType=Products&element={productname: “”, productcode: “”,
>> description: “"}
>>
>> Sometimes in the productname or description there is a “&” and as you can
>> guess this breaks the json resulting in error. I’ve tried sending plain
>> text and it doesn’t work either. *How can I proceed? *
>>
>>
>> Probably this is a bug and we need to re-design the API’s expecting the
>> body as a json possible implementation:
>>
>> {
>> element: “ELEMENT”,
>> data: {
>> }
>> }
>>
>> Best Regards,
>> *Sukhdev Mohan* | *Software Developer*
>>
>>
>>
>>
>>
>>
>>
>>
>> _______________________________________________http://www.vtiger.com/
>>
>> --
>> Un saludo
>> Joe
>> TSolucio
>>
>> JPL TSolució, S.L. garantiza la confidencialidad de los datos que obran en su poder y según lo estipulado por la LOPD
>> (Ley Orgánica 15/1999 de 13 de diciembre de Protección de Datos de Carácter Personal). Este mensaje se dirige
>> exclusivamente a su destinatario y puede contener información privilegiada o confidencial. Si no es vd. el destinatario
>> indicado, queda notificado de que la lectura, utilización, divulgación y/o copia sin autorización está prohibida en
>> virtud de la legislación vigente. Si ha recibido este mensaje por error, le rogamos que nos lo comunique inmediatamente
>> por esta misma vía y proceda a su destrucción. El correo electrónico vía Internet no permite asegurar la confidencialidad
>> de los mensajes que se transmiten ni su integridad o correcta recepción. JPL TSolució, S.L. no asume ninguna
>> responsabilidad por estas circunstancias.
>>
>> _______________________________________________
>> http://www.vtiger.com/
>
> _______________________________________________
> http://www.vtiger.com/

-- 









*Development Manager Radus28 Software Solution [image: Radus28 Software
Solution] 123, Level 2, Mc Larens Building Baudhaloka Mw. Colombo 04 Sri
Lanka M : +94773795291 E  : sutharsan at radus28.com <sutharsan at radus28.com> W
: www.radus28.com <http://www.radus28.com>*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20210419/ffdd3aec/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: logo_web.png
Type: image/png
Size: 15612 bytes
Desc: not available
URL: <http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20210419/ffdd3aec/attachment-0001.png>


More information about the vtigercrm-developers mailing list