Implementation:SeleniumHQ Selenium Closure Json
| Knowledge Sources | |
|---|---|
| Domains | JavaScript_Atoms, Vendored_Library |
| Last Updated | 2026-02-12 00:00 GMT |
Overview
Vendored Google Closure Library module providing JSON utility functions used by Selenium JavaScript atoms.
Description
goog.json is a vendored copy of the Google Closure Library module. It provides JSON parsing and serialization utilities, including a safe JSON validator (isValid), native JSON support toggling, and a custom Serializer class. The module includes careful validation to prevent code injection via eval-based parsing. Selenium uses this as part of its JavaScript atom infrastructure.
Usage
This module is consumed internally by Selenium's JavaScript atoms build system. Not imported directly by end users.
Code Reference
Source Location
- Repository: SeleniumHQ_Selenium
- File: third_party/closure/goog/json/json.js
- Lines: 1-382
Key Exports
goog.provide('goog.json');
goog.provide('goog.json.Replacer');
goog.provide('goog.json.Reviver');
goog.provide('goog.json.Serializer');
goog.json.USE_NATIVE_JSON = goog.define('goog.json.USE_NATIVE_JSON', false);
goog.json.isValid = function(s) { ... };