ECMAScript: JSON
Since JSON
object is missed only in very old engines like IE7-, core-js
does not provide a full JSON
polyfill, however, fix already existing implementations by the current standard, for example, well-formed JSON.stringify
. JSON
is also fixed in other modules - for example, Symbol
polyfill fixes JSON.stringify
for correct work with symbols.
Modules
es.json.to-string-tag
and es.json.stringify
.
namespace JSON {
stringify(value: any, replacer?: Array<string | number> | (this: any, key: string, value: any) => any, space?: string | number): string | void;
@@toStringTag: 'JSON';
}
CommonJS entry points
core-js(-pure)/es|stable|actual|full/json/stringify
core-js(-pure)/es|stable|actual|full/json/to-string-tag
Example
JSON.stringify({ '𠮷': ['\uDF06\uD834'] }); // => '{"𠮷":["\\udf06\\ud834"]}'