MCPcopy Create free account
hub / github.com/AdRoll/baker / Process

Method Process

filter/expand_json.go:103–115  ·  view source on GitHub ↗
(l baker.Record, next func(baker.Record))

Source from the content-addressed store, hash-verified

101}
102
103func (f *ExpandJSON) Process(l baker.Record, next func(baker.Record)) {
104 data := f.processJSON(l.Get(f.source))
105
106 for i, c := range f.jexp {
107 r, err := c.Search(data)
108 if err != nil || r == nil {
109 continue
110 }
111 l.Set(f.fields[i], f.postProcessJSON(r))
112 }
113
114 next(l)
115}
116
117func (f *ExpandJSON) processJSON(data []byte) interface{} {
118 if len(data) == 0 {

Callers 2

TestExpandJSONFunction · 0.95
BenchmarkExpandJSONFunction · 0.95

Calls 4

processJSONMethod · 0.95
postProcessJSONMethod · 0.95
GetMethod · 0.65
SetMethod · 0.65

Tested by 2

TestExpandJSONFunction · 0.76
BenchmarkExpandJSONFunction · 0.76