json-override
The json-override
snippet wraps JSON.parse
to override values from the same list as override-property-read
.
Parameters
Name | Description | Mandatory |
---|---|---|
| A list of space-separated properties to remove. It also accepts property chains, like | Yes |
value | The value to override the property with. | Yes |
| A list of space-separated properties. All must be present for pruning to occur. Also accepts property chains. | No |
filter | A string to look for in the raw string, before it's passed to If the string begins and ends with a slash ( | No |
Possible override values
Value | Definition |
---|---|
undefined | |
false | |
true | |
null | |
" " | An empty string |
decimal integer | |
| A function with an empty body |
| A function that returns |
| An array with no elements |
| An object with no properties |
Filter examples
The following table lists examples that use the json-override
snippet:
Filter | Result |
---|---|
| Replaces the |
| Replaces all |
| Replaces any |
| Replaces all |
| Replaces the |
Debugging
The following table contains messages you'll find useful during debugging:
Message | When the message occurs | Definition |
---|---|---|
| After | The snippet was injected and the API was wrapped. |
| After a property was overridden. | A property was found and overridden. If |
Last updated