Languages

What is a JSON-safe object?

5 points
Asked by:
rmlocerd
302

Reading Kyle Simpson's book You Don't Know JS: this & Object Prototypes, I have found some term: JSON-safe object.

What it is?

1 answer
1 points
Answered by:
Root-ssh
178180

It is object that can be converted to JSON without loosing any information.

That object shouldn't contain properties types that are not allowed in JSON notaiton.

Allowed are: POJO objects ({}), arrays, strings, numbers and booleans.

e.g.

Not JSON-safe object example:

0 commentsAdd comment
Donate to Dirask
Our content is created by volunteers - like Wikipedia. If you think, the things we do are good, donate us. Thanks!
Join to our subscribers to be up to date with content, news and offers.
Native Advertising
🚀
Get your tech brand or product in front of software developers.
For more information Contact us
Dirask - we help you to
solve coding problems.
Ask question.

❤️💻 🙂

Join