Documentation
¶
Index ¶
- Constants
- func Json2Nbt(b []byte, byteOrder binary.ByteOrder) ([]byte, error)
- func Nbt2Json(b []byte, byteOrder binary.ByteOrder, comment string) ([]byte, error)
- func Nbt2Yaml(b []byte, byteOrder binary.ByteOrder, comment string) ([]byte, error)
- func Yaml2Nbt(b []byte, byteOrder binary.ByteOrder) ([]byte, error)
- type JsonParseError
- type NbtJson
- type NbtParseError
- type NbtTag
- type NbtTagList
Constants ¶
View Source
const Name = "Named Binary Tag to JSON"
Name is the json document's name:
View Source
const Version = "0.3.0"
Version is the json document's nbt2JsonVersion:
Variables ¶
This section is empty.
Functions ¶
Types ¶
type JsonParseError ¶
type JsonParseError struct {
// contains filtered or unexported fields
}
JsonParseError is when the data does not match an expected pattern. Pass it message string and downstream error
func (JsonParseError) Error ¶
func (e JsonParseError) Error() string
type NbtJson ¶ added in v0.2.0
type NbtJson struct {
Name string `json:"name"`
Version string `json:"version"`
Nbt2JsonUrl string `json:"nbt2JsonUrl"`
ConversionTime string `json:"conversionTime,omitempty"`
Comment string `json:"comment,omitempty"`
Nbt []*json.RawMessage `json:"nbt"`
}
NbtJson is the top-level JSON document
type NbtParseError ¶
type NbtParseError struct {
// contains filtered or unexported fields
}
NbtParseError is when the data does not match an expected pattern. Pass it message string and downstream error
func (NbtParseError) Error ¶
func (e NbtParseError) Error() string
type NbtTag ¶
type NbtTag struct {
TagType byte `json:"tagType"`
Name string `json:"name"`
Value interface{} `json:"value,omitempty"`
}
NbtTag represents one NBT tag for each struct
type NbtTagList ¶
type NbtTagList struct {
TagListType byte `json:"tagListType"`
List []interface{} `json:"list"`
}
NbtTagList represents an NBT tag list
Click to show internal directories.
Click to hide internal directories.