MCPcopy Create free account
hub / github.com/chronoxor/FastBinaryEncoding / UnmarshalJSON

Method UnmarshalJSON

projects/Go/proto/test/StructSet.go:631–642  ·  view source on GitHub ↗

Convert JSON to set

(body []byte)

Source from the content-addressed store, hash-verified

629
630// Convert JSON to set
631func (s *setF4) UnmarshalJSON(body []byte) error {
632 var array []StructSimple
633 err := fbe.Json.Unmarshal(body, &array)
634 if err != nil {
635 return err
636 } else {
637 for _, v := range array {
638 (*s)[v.Key()] = v
639 }
640 }
641 return nil
642}

Callers

nothing calls this directly

Calls 1

KeyMethod · 0.45

Tested by

no test coverage detected