Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6807403
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T19:49:42+00:00 2026-05-26T19:49:42+00:00

I am trying to deserialize a JSON string for an iOS app that I

  • 0

I am trying to deserialize a JSON string for an iOS app that I am writing. However, my app keeps getting hung up on the “\” escape sequence for double-quotes in the feed I am trying to read. What is a quick way to strip out that sequence so I can parse the feed correctly? (The feed is coming from my Django application on the server-side.)

Here is my json string:

[{\"pk\": 4161, \"model\": \"news.article\", \"fields\": {\"date_live\": \"2011-11-03 00:00:01\", \"date_added\": \"2011-11-03 03:10:59\", \"date_modified\": \"2011-11-03 03:10:59\", \"slug\": \"thursday-feature-backup-comic\", \"title\": \"THURSDAY FEATURE --> Backup Comic\"}}

You will notice that all of my “nodes” have the “\” escape sequence for the quote. Any ideas?

Thank you in advance for any help here.

L.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T19:49:42+00:00Added an answer on May 26, 2026 at 7:49 pm

    If you are trying to remove the escape inside python:

    import re, json
    myjson = re.sub(r"\\", "", "[{\"pk\": 4161, \"model\": \"news.article\", \"fields\": {\"date_live\": \"2011-11-03 00:00:01\", \"date_added\": \"2011-11-03 03:10:59\", \"date_modified\": \"2011-11-03 03:10:59\", \"slug\": \"thursday-feature-backup-comic\", \"title\": \"THURSDAY FEATURE --> Backup Comic\"}}]")
    myjson = json.loads(myjson) # will decode json
    

    But if you want to remove the escape from javascript:

    myjson = "[{\"pk\": 4161, \"model\": \"news.article\", \"fields\": {\"date_live\": \"2011-11-03 00:00:01\", \"date_added\": \"2011-11-03 03:10:59\", \"date_modified\": \"2011-11-03 03:10:59\", \"slug\": \"thursday-feature-backup-comic\", \"title\": \"THURSDAY FEATURE --> Backup Comic\"}}]";
    myjson = eval(myjson.replace(/\\/, "")); // will encode json
    

    Note: You forgot a ] at the end of your string. At least I had an error when I’ve tryed to eval it. I put the ] at the end and eval worked.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to deserialize a JSON string that was serialized by JSON.Net 4.0
I am trying to deserialize a JSON string that looks like so: {'type':'clientlist','client_list':[]} I
i'm trying to deserialize a json string pulled from the web using json.net, but
I'm trying to deserialize a json response and am getting the value cannot be
I'm trying to deserialize a relative simple JSON string, which looks like: [{ FacebookID:
here's my problem: I'm trying to deserialize json that hasn't been done by me.
I am trying to deserialize a JSON String like (extracted this bit to show
I'm trying to deserialize a JSON string with the following syntax into C# classes,
I'm trying to deserialize json to an object model where the collections are represented
I'm trying to deserialize an xml structure that looks like this: <somecontainer> <key1>Value1</key1> <key1>Value2</key1>

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.