Skip to content

Tag: serialization

What is data serialization?

First of all, I couldn’t get clear definition of it from WikiPedia or even from serialize function in the PHP manual. I need to know some cases where we need the term serialization and how things are going without it? In other words, Where you need serialization and without it your code will be missing some important feature. Answer What

How to stringify event object?

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 ? Answer 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