Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

165
Views
Need to parse JSON string with value is quoted curly braces

I need to parse JSON string.

I've tried JSON.stringify and then JSON.parse below sample string, but server performed escape sequencing

I used str.replace('/\\/g','') to remove the escape sequence but that doesnt help because if you look in the "default_request" key is wraps its value with "" which is doesnt allow me parse it using JSON.parse()

    {
      "request": {
        "service_name": "authService",
        "url": "https://some-url.com/{accounts}",
        "default_request": "{\"authMethod\":\"somename\",\"multiCheck\":false}"
        }
    }

so I tried to replace "{ with { and }" with }

str.replace('/"{/g','{')).replace('/}"/g','}'))

but it creates another problem.

Favourable condition
    {
      "request": {
       "service_name": "authService",
       "url": "https://some-url.com/{accounts}",
       "default_request": {\"authMethod\":\"somename\",\"multiCheck\":false}
      }
    }
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

default_request was stringifyied twice. to fix it, try this

jsonObject.request.default_request = JSON.parse(jsonObject.request.default_request);
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!