MCPcopy Create free account
hub / github.com/cloudquery/cloudquery / sanitizeJSONRawMessage

Function sanitizeJSONRawMessage

plugins/destination/s3/client/write.go:144–152  ·  view source on GitHub ↗
(rawMessage json.RawMessage)

Source from the content-addressed store, hash-verified

142}
143
144func sanitizeJSONRawMessage(rawMessage json.RawMessage) (any, error) {
145 var data any
146 err := json.Unmarshal(rawMessage, &data)
147 if err != nil {
148 return nil, err
149 }
150
151 return sanitizeJSONKeysForObject(data), nil
152}
153
154func sanitizeJSONKeysForObject(data any) any {
155 // we only care about objects that have keys: present either while nesting or in arrays

Callers 2

sanitizeRecordJSONKeysFunction · 0.85

Calls 1

Tested by 1