简体   繁体   中英

Serializing complex objects in JavaScript

I would like to know if there are any libraries or tools that can serialize complex javascript objects to a string (that may contain functions, regex, etc.) that don't require the use of npm.

I've come across several different libraries for this purpose but they all required npm.

Are there any good serialization libraries that don't require npm and are preferably written in pure vanilla JS?

Npm is just a catalog of all of these pure vanilla js libraries. You do not have to use npm to access them. The packages will usually have a link to the source code on github or something. Go to the source, clone the project, do whatever you need to.

Use the built in JSON.stringify() for a vanilla, no external dependencies, object parser.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM