json-override
The json-override snippet wraps JSON.parse to override values from the same list as override-property-read.
Parameters
|
Name |
Description |
Mandatory |
|---|---|---|
|
|
Space-separated properties to remove. Accepts property chains ( |
Yes |
|
|
The value to override the property with. |
Yes |
|
|
Space-separated properties — all must be present for override to occur. |
No |
|
|
String or regex to look for in the raw string before JSON.parse. If no match, no further search is done. |
No |
Possible override values
|
Value |
Definition |
|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Empty string |
|
|
|
|
|
Function with empty body |
|
|
Function returning true |
|
|
Array with no elements |
|
|
Object with no properties |
Filter examples
|
Filter |
Result |
|---|---|
|
|
Replaces |
|
|
Replaces all |
|
|
Replaces |
|
|
Replaces all |
|
|
Replaces |
Debugging
|
Message |
When |
Definition |
|---|---|---|
|
|
After wrapping |
The API was wrapped. |
|
|
Parsing placeholder |
The path leading to the placeholder is accurate. |
|
|
After override |
A property was found and overridden. |