MCPcopy Create free account
hub / github.com/ZeppelinMC/Zeppelin / JSONTextComponent

Method JSONTextComponent

protocol/net/io/encoding/reader.go:242–248  ·  view source on GitHub ↗
(comp *text.TextComponent)

Source from the content-addressed store, hash-verified

240}
241
242func (r Reader) JSONTextComponent(comp *text.TextComponent) error {
243 var d []byte
244 if err := r.ByteArray(&d); err != nil {
245 return err
246 }
247 return json.Unmarshal(d, comp)
248}
249
250func (r Reader) TextComponent(comp *text.TextComponent) error {
251 var tag int8

Callers 2

EncodeMethod · 0.45
DecodeMethod · 0.45

Calls 1

ByteArrayMethod · 0.95

Tested by

no test coverage detected