MCPcopy
hub / github.com/pquerna/ffjson / lastConditional

Function lastConditional

inception/encoder.go:475–481  ·  view source on GitHub ↗

We check if the last field is conditional.

(fields []*StructField)

Source from the content-addressed store, hash-verified

473
474// We check if the last field is conditional.
475func lastConditional(fields []*StructField) bool {
476 if len(fields) > 0 {
477 f := fields[len(fields)-1]
478 return f.OmitEmpty
479 }
480 return false
481}
482
483func CreateMarshalJSON(ic *Inception, si *StructInfo) error {
484 conditionalWrites := lastConditional(si.Fields)

Callers 2

getGetInnerValueFunction · 0.85
CreateMarshalJSONFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…