From 965b22a839aa43decb7b390c652b138ded806287 Mon Sep 17 00:00:00 2001 From: Lyan Dwi Date: Wed, 29 Mar 2023 17:06:56 +0700 Subject: [PATCH] fix: change null char to '\u0000' --- serialize.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/serialize.go b/serialize.go index e7ab80b..730fc87 100644 --- a/serialize.go +++ b/serialize.go @@ -180,7 +180,7 @@ func MarshalStruct(input interface{}, options *MarshalOptions) ([]byte, error) { } else if fieldName == "" { fieldName = lowerCaseFirstLetter(typeOfValue.Field(i).Name) } else if fieldName == "data" { - fieldName = "\000" + options.StructName + "\000" + fieldName + fieldName = "\u0000" + options.StructName + "\u0000" + fieldName } buffer.Write(MarshalString(fieldName))