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

Method UnmarshalJSON

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

Convert JSON to set

(body []byte)

Source from the content-addressed store, hash-verified

391
392// Convert JSON to set
393func (s *setF2) UnmarshalJSON(body []byte) error {
394 var array []EnumSimple
395 err := fbe.Json.Unmarshal(body, &array)
396 if err != nil {
397 return err
398 } else {
399 for _, v := range array {
400 (*s)[v.Key()] = v
401 }
402 }
403 return nil
404}
405
406// Set wrapper for the field F3
407type setF3 map[FlagsSimpleKey]FlagsSimple

Callers

nothing calls this directly

Calls 1

KeyMethod · 0.45

Tested by

no test coverage detected