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

Function NewStructHashFromJSON

projects/Go/proto/test/StructHash.go:74–81  ·  view source on GitHub ↗

Create a new StructHash struct from JSON

(buffer []byte)

Source from the content-addressed store, hash-verified

72
73// Create a new StructHash struct from JSON
74func NewStructHashFromJSON(buffer []byte) (*StructHash, error) {
75 result := *NewStructHash()
76 err := fbe.Json.Unmarshal(buffer, &result)
77 if err != nil {
78 return nil, err
79 }
80 return &result, nil
81}
82
83// Struct shallow copy
84func (s *StructHash) Copy() *StructHash {

Callers

nothing calls this directly

Calls 1

NewStructHashFunction · 0.85

Tested by

no test coverage detected