From 2163995ea5531a0c0b67034b6cbadda7a0e616e9 Mon Sep 17 00:00:00 2001 From: Asaf Shitrit <62242636+asaf-shitrit@users.noreply.github.com> Date: Tue, 15 Nov 2022 14:10:06 +0200 Subject: [PATCH] Typo fix in README.md file MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit A minor typo in the sentence "Therefore, the arguments for `Marshal` and `Unmarshal` are always escape to the heap." The word "escape" should be "escaped" 🙂 --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 56862377..7bacc54f 100644 --- a/README.md +++ b/README.md @@ -184,7 +184,7 @@ func Marshal(v interface{}) ([]byte, error) { `json.Marshal` and `json.Unmarshal` receive `interface{}` value and they perform type determination dynamically to process. In normal case, you need to use the `reflect` library to determine the type dynamically, but since `reflect.Type` is defined as `interface`, when you call the method of `reflect.Type`, The reflect's argument is escaped. -Therefore, the arguments for `Marshal` and `Unmarshal` are always escape to the heap. +Therefore, the arguments for `Marshal` and `Unmarshal` are always escaped to the heap. However, `go-json` can use the feature of `reflect.Type` while avoiding escaping. `reflect.Type` is defined as `interface`, but in reality `reflect.Type` is implemented only by the structure `rtype` defined in the `reflect` package.