This is a pretty straightforward migration, and improves performance
for users with modern browsers (since the skip function means
browsers with native JSON don't need to download a JSON module)
Stating a removal version will encourage this migration.
Change-Id: I8fe83f30fd27f7bfe50e756846486abdadb91189
( function ( mw, $ ) {
+ // @deprecated since 1.24. The 'jquery.json' module will be removed in MW 1.25. Use the 'json' module.
+
mw.log.deprecate( $, 'toJSON', $.toJSON, 'Use JSON.stringify instead (module "json" for polyfill).' );
mw.log.deprecate( $, 'evalJSON', $.evalJSON, 'Use JSON.parse instead (module "json" for polyfill).' );
mw.log.deprecate( $, 'secureEvalJSON', $.secureEvalJSON, 'Use JSON.parse instead (module "json" for polyfill).' );