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

Method postProcessJSON

filter/expand_json.go:130–146  ·  view source on GitHub ↗
(r interface{})

Source from the content-addressed store, hash-verified

128}
129
130func (f *ExpandJSON) postProcessJSON(r interface{}) []byte {
131 switch typedValue := r.(type) {
132 case json.Number:
133 return []byte(typedValue)
134 case string:
135 return []byte(typedValue)
136 case bool:
137 if typedValue {
138 return f.trueFalseValues[trueIdx]
139 } else {
140 return f.trueFalseValues[falseIdx]
141 }
142 default:
143 val, _ := json.Marshal(typedValue)
144 return val
145 }
146}

Callers 1

ProcessMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected