项目作者: Raggaer

项目描述 :
Unserializes / Serializes TFS database item attributes
高级语言: Go
项目地址: git://github.com/Raggaer/tfs_item_attributes_reader.git
创建时间: 2020-10-31T02:54:39Z
项目社区:https://github.com/Raggaer/tfs_item_attributes_reader

开源协议:MIT License

下载


tfs_item_attributes_reader

Unserializes/Serializes TFS database stored items.

You can directly load data as []byte, load from hex string or load from a file.

Example

  1. item, err := UnserializeHexString("18190073616D7572616920736F756C2072756E652028543129202B3822010000000000000005006C6576656C020800000000000000")
  2. if err != nil {
  3. // Handle
  4. return
  5. }
  6. log.Println(item.Name)
  7. ...

The unserialized item will look like this:

  1. {
  2. "Name": "Super Secret Rune",
  3. "CustomAttributes": {
  4. "level": {
  5. "Key": "level",
  6. "Value": 8,
  7. }
  8. }
  9. }

You can also serialize it back:

  1. s, err := item.SerializeAsHexString()
  2. if err != nil {
  3. // Handle
  4. return
  5. }
  6. log.Println(s)
  1. 18190073616D7572616920736F756C2072756E652028543129202B3822010000000000000005006C6576656C020800000000000000