MCPcopy Create free account
hub / github.com/Mnexa-AI/e2a / nullJSON

Function nullJSON

internal/identity/screening.go:172–177  ·  view source on GitHub ↗

nullJSON returns nil for empty/zero JSON so it persists as SQL NULL.

(j json.RawMessage)

Source from the content-addressed store, hash-verified

170
171// nullJSON returns nil for empty/zero JSON so it persists as SQL NULL.
172func nullJSON(j json.RawMessage) any {
173 if len(j) == 0 {
174 return nil
175 }
176 return []byte(j)
177}
178
179func jsonOrNil(b []byte) json.RawMessage {
180 if len(b) == 0 {

Callers 1

CreateProtectionEventMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected