Tag:UUID serialization

  • Implementation of Java UUID serialization by golang

    Time:2021-4-22

    At present, only the fixed UUID generated by Java is implemented: 85bb94b8-fd4b-4e1c-8f49-3cedd49d8f28 package main import ( “encoding/binary” “encoding/json” “fmt” “log” “os” “strings” “time” “github.com/Shopify/sarama” “github.com/google/uuid” ) const ( DATE_TIME_PATTERN = “” STREAM_MAGIC = 0xaced STREAM_VERSION = 5 TC_STRING = 0x74 TC_OBJECT = 0x73 TC_CLASSDESC = 0x72 SC_SERIALIZABLE = 0x02 TC_ENDBLOCKDATA = 0x78 TC_NULL = 0x70 […]