• python
  • javascript
  • reactjs
  • sql
  • c#
  • java
Facebook Twitter Instagram
Devs Fixed
  • python
  • javascript
  • reactjs
  • sql
  • c#
  • java
Devs Fixed
Home ยป Resolved: Issue sending over JSON as string from POSTMAN to node server

Resolved: Issue sending over JSON as string from POSTMAN to node server

0
By Isaac Tonny on 17/06/2022 Issue
Share
Facebook Twitter LinkedIn

Question:

I have some json that looks like this:
Then I call JSON.stringify(json) which gives me the following:
I want to send data from the UI to my server. Currently I am using POSTMAN for this.
details here needs to be a string but when I send over the data I get the following error on the server

SyntaxError: Unexpected token } in JSON at position 114


Does anyone have any ideas here?

Answer:

JSON does not allow for single quotes, what you are trying to send is invalid. What you need to do is use double quotes and escape the internal quotes for the JSON key/values:

If you have better answer, please add a comment about this, thank you!

javascript json post postman
Share. Facebook Twitter LinkedIn

Related Posts

Resolved: Convert function is not working with {fn } in SQL Server

24/03/2023

Resolved: Why reference in pointer array doesn’t have data?

24/03/2023

Resolved: EntityFramework creates/runs migrations using parameterless DataContext instance

24/03/2023

Leave A Reply

© 2023 DEVSFIX.COM

Type above and press Enter to search. Press Esc to cancel.