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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T01:11:04+00:00 2026-06-08T01:11:04+00:00

JSON.stringify(eventObject); gives: TypeError: Converting circular structure to JSON dojox.json.ref.toJson(eventObject); gives: TypeError: Accessing selectionEnd on

  • 0

JSON.stringify(eventObject);

gives:

TypeError: Converting circular structure to JSON


dojox.json.ref.toJson(eventObject);

gives:

TypeError: Accessing selectionEnd on an input element that cannot have a selection.


Is there some library/code ready to use to accomplish it ?

  • 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-08T01:11:06+00:00Added an answer on June 8, 2026 at 1:11 am

    You won’t be able to serialize an event object with JSON.stringify, because an event object contains references to DOM nodes, and the DOM has circular references all over the place (e.g. child/parent relationships). JSON can’t handle these by default, so you’re a bit out of luck there.

    I’d suggest to look at How to serialize DOM node to JSON even if there are circular references? which has a few suggestions on how to serialize a DOM node. Also, the following questions seem to have useful information:

    • How to save an object with circular references?
    • Stringify (convert to JSON) a JavaScript object with circular reference

    JSON libraries able to handle circular references seem to be

    • JSON-js (see cycle.js)
    • dojox.json.ref

    Alternatively, you could delete all references to DOM nodes if you don’t need them, and then serialize the object. You shouldn’t do this after all. See @PointedEars comment 🙂

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

Sidebar

Related Questions

I'm trying convert jQuery Data object to JSON string. I tried: $.data(plant).toJSON() JSON.stringify($.data(plant)) but
JSON.stringify is converting my json object to the following string {\2003\:{\1\:{\2\:[\test\],\3\:[\test2\]}}} When it should
Using JSON.stringify and JSON.parse to serialize and deserialize objects has subtle problems such as
I have: localStorage.xxx = JSON.stringify([[something,hello],[something2,hello2]]); . How can i add a new array in
I have reason to believe console.log and JSON.stringify can produce inconsistent views of the
I am building an array in javascript, using JSON.stringify() on it, and then setting
I am currently data into a local db as following: window.localStorage.setItem('QQIDVAL' + ID, JSON.stringify(this));
Need help, function getFamily() { FB.api('/me/family', function(response) { alert(JSON.stringify(response)); }); } With the above
I downloaded the JSON2.js from https://github.com/douglascrockford/JSON-js/blob/master/json2.js and it does not have implementation for JSON2.stringify()
I use JSON.stringify method to pass an array to server. I have an array

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.