# Error "Malformed JSON string"

**URL:** <https://community.postman.com/t/error-malformed-json-string/16455>\
**Category:** Help Hub\
**Created:** [October 3, 2020, 8:28pm UTC](https://community.postman.com/t/error-malformed-json-string/16455 "2020-10-03T20:28:14Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![eduardo7](https://avatars.discourse-cdn.com/v4/letter/e/c5a1d2/32.png) [@eduardo7](https://community.postman.com/u/eduardo7)\
**Post date:** [October 3, 2020, 8:28pm UTC](https://community.postman.com/t/error-malformed-json-string/16455/1 "2020-10-03T20:28:14Z")

</div>

Buenas tardes ,  
si alguien me pudiera ayudar con un error de formato json.

Estoy creando un cliente con ciertos parámetros pero a la hora de enviar , me sale el  
mensaje **(Malformed JSON string).**

{“session\_id”:“a0ff5bd015481e0c727136998954af7f”}  
{“customer\_info”:{“name”:“sistemasflx”,“login”:“eperalta”,“password”:“eperalta17”}}

![Malformed JSON string](https://us1.discourse-cdn.com/getpostman/original/3X/3/6/36ca1c887bcc63251caf237e83f4253b933ad6a8.png)

Saludos

---

<div class="post-metadata">

**Author:** ![bpricilla](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/bpricilla/32/6511_2.png) [@bpricilla](https://community.postman.com/u/bpricilla)\
**Post date:** [October 4, 2020, 4:08am UTC](https://community.postman.com/t/error-malformed-json-string/16455/2 "2020-10-04T04:08:19Z")

</div>

@eduardo7: Welcome to the community. I translated your message and hope you are trying to do the below:

"Good afternoon ,  
if someone could help me with a json format error.

I am creating a client with certain parameters but when sending, I get the  
message (Malformed JSON string)."

Can you please provide more details? Please ensure that the params are correct. Also Ensure you have added the correct “Content-Type” in the headers.

---

<div class="post-metadata">

**Author:** ![allenheltondev](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/allenheltondev/32/31738_2.png) [@allenheltondev](https://community.postman.com/u/allenheltondev)\
**Post date:** [October 5, 2020, 11:56am UTC](https://community.postman.com/t/error-malformed-json-string/16455/3 "2020-10-05T11:56:50Z")

</div>

¿Puedes intentar usar tu JSON como un tipo de cuerpo sin formato en la solicitud? Algo parecido a la siguiente captura de pantalla:

 ![image](https://us1.discourse-cdn.com/getpostman/original/3X/d/2/d2791c33e2a1a06165dc8c00ab7f9ab4527dcea9.png)  
El mensaje de error significa que el formato en el que está pasando los datos es incorrecto, lo que me hace pensar que pasarlo en este formato podría ayudar.

---

<div class="post-metadata">

**Author:** ![eduardo7](https://avatars.discourse-cdn.com/v4/letter/e/c5a1d2/32.png) [@eduardo7](https://community.postman.com/u/eduardo7)\
**Post date:** [October 19, 2020, 2:15pm UTC](https://community.postman.com/t/error-malformed-json-string/16455/4 "2020-10-19T14:15:58Z")

</div>

Gracias estimados,

pude consumir la api correctamente , el problema era el formato del json tuve que utilizar una aplicativo para limpiar el json.

> **[Trim Text - Trim Strings - Online - Browserling Web Developer Tools](https://www.browserling.com/tools/text-trim)**
>
> Useful, free online tool that trims text lines. No ads, nonsense or garbage, just a text trimmer. Press button, get result.

 ![image](https://us1.discourse-cdn.com/getpostman/original/3X/3/f/3f5a4db3fa6133df995802d13d3f4207f67b6cbc.png)

Saludos

---

<div class="post-metadata">

**Author:** ![allenheltondev](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/allenheltondev/32/31738_2.png) [@allenheltondev](https://community.postman.com/u/allenheltondev)\
**Post date:** [October 20, 2020, 11:23am UTC](https://community.postman.com/t/error-malformed-json-string/16455/5 "2020-10-20T11:23:52Z")

</div>

¡Excelente! Me alegro de que haya sido una solución fácil.
