How does Serializable Structured Clone differ from JSON.stringify/parse for copying JavaScript values?

JavaScript Professional Hard

JavaScript Professional — Hard

How does Serializable Structured Clone differ from JSON.stringify/parse for copying JavaScript values?

Key points

  • Structured clone preserves more JavaScript types than JSON.stringify
  • JSON.stringify doesn't handle circular references well
  • Structured clone is more versatile for complex data structures

Ready to go further?

Related questions