perf(encode): write scalars and scalar arrays without boxing
Test / test (push) Successful in 1m34s

Assisted-by: GLM 5.3 Flash
This commit is contained in:
2026-09-22 01:46:26 +02:00
parent ebaca18093
commit 80b2bc6e0f
4 changed files with 354 additions and 28 deletions
+10
View File
@@ -885,3 +885,13 @@ name = "b"
}
})
}
func TestParseCRLFDocument(t *testing.T) {
tree, err := ParseMap([]byte("a = 1\r\nb = 2\r\n[t]\r\nc = \"x\"\r\n"))
if err != nil {
t.Fatal(err)
}
if tree["a"] != int64(1) || tree["b"] != int64(2) {
t.Errorf("tree = %v", tree)
}
}