I have some HTML that contains a JSON string. In the on DOM ready callback, I have something like this:
MyObject = JSON.parse($(\'#TheJsonString\').
To suppress this warning for a specific function, you can use the @suppress annotation:
@suppress
/** * @suppress {missingProperties} */ function useJsonObject() { ... }
To turn off this warning globally, use the jscomp_off compiler flag to turn off the missingProperties class of warnings.
jscomp_off
missingProperties