MCPcopy Create free account
hub / github.com/buger/jsonparser / Delete

Function Delete

parser.go:1182–1185  ·  view source on GitHub ↗

* Del - Receives existing data structure, path to delete. Returns: `data` - return modified data */ SYS-REQ-010, SYS-REQ-033, SYS-REQ-034, SYS-REQ-035, SYS-REQ-048, SYS-REQ-049, SYS-REQ-050, SYS-REQ-056

(data []byte, keys ...string)

Source from the content-addressed store, hash-verified

1180*/
1181// SYS-REQ-010, SYS-REQ-033, SYS-REQ-034, SYS-REQ-035, SYS-REQ-048, SYS-REQ-049, SYS-REQ-050, SYS-REQ-056
1182func Delete(data []byte, keys ...string) []byte {
1183 result, _ := deleteFoundConfig(DefaultConfig, data, keys...)
1184 return result
1185}
1186
1187// DeleteFound removes the value addressed by keys and reports whether the
1188// value was found and removed. When found is false, result is data unchanged.

Callers 15

BenchmarkDeleteSmallFunction · 0.92
BenchmarkDeleteNestedFunction · 0.92
BenchmarkDeleteLargeFunction · 0.92
DeleteMethod · 0.85
TestMutationNilSafetyFunction · 0.85
TestMutationUnicodeKeysFunction · 0.85
FuzzPathMutationFunction · 0.85
applySequenceStepFunction · 0.85
FuzzDeleteFunction · 0.85

Calls 1

deleteFoundConfigFunction · 0.85

Tested by 15

BenchmarkDeleteSmallFunction · 0.74
BenchmarkDeleteNestedFunction · 0.74
BenchmarkDeleteLargeFunction · 0.74
TestMutationNilSafetyFunction · 0.68
TestMutationUnicodeKeysFunction · 0.68
FuzzPathMutationFunction · 0.68
applySequenceStepFunction · 0.68
TestDeleteFunction · 0.68