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 8649603
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T13:36:08+00:00 2026-06-12T13:36:08+00:00

My problem is html content not being parsed with JSON.parse . I am getting

  • 0

My problem is html content not being parsed with JSON.parse .

  1. I am getting input from a content editable div.

    var content = $("#contentInput").html();

  2. I am sending it to server after JSON.stringify

    var dataToServer= JSON.stringify(content); //sending an object

  3. The same content I am getting from server, and I attempting to parse it.;

    var dataFromServer = JSON.parse(content);

Here my problem raises parser throwing error. content of html data receiving as it is.

I was tried eval but after reading the some articles I was withdrawn my decision.

How to resolve the problem.

  • 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-06-12T13:36:09+00:00Added an answer on June 12, 2026 at 1:36 pm

    Here is fiidle demo of working code.

    The problem is your server corrupting the content. Please check out your server code, it may add some non printable charaecters.

    JSON.parse fails if the content not in JSON format. It strictly follow the rules of jsonstring to parse it( I mean double quotations and other /).

    Your server may be adding some other unuseful characters to content or jsonstring.

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

Sidebar

Related Questions

My problem comes from HTML dropdown select not able to preserve multiple consecutive whitespaces
Snippet code to load the content of the template into the div (main.html): var
Here is my code: $('#right').load('textes.html #nicolas'); $('#right').load('textes.html #antoine'); The problem is that the content
This is not a CSS problem. The HTML isn't there. I need the menu,
NOTE : My problem is NOT that my links are not being replaced. But,
I am having a problem with dynamically loaded views not being able to attach
My problem is similar to: JSF tags not rendered , JSf tags not being
I have a strange problem whereby the ValidationSummary is not being displayed. However, the
Here's the problem html: <ul id="update-list"> <li class="update" onclick="window.location('some_url')"> <h2> some header </h2> <p>
Hi I have problem with html height. My height is now set to pixels

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.