Browse Source

codec: update docs on custom encoding/decoding - showing symmetry for Text(M|Unm)arshaler

Updates #286
Ugorji Nwoke 6 years ago
parent
commit
e2bddce071
2 changed files with 2 additions and 2 deletions
  1. 1 1
      codec/0doc.go
  2. 1 1
      codec/README.md

+ 1 - 1
codec/0doc.go

@@ -109,7 +109,7 @@ We determine how to encode or decode by walking this decision tree
   - is there an extension registered for the type?
   - is format binary, and is type a encoding.BinaryMarshaler and BinaryUnmarshaler?
   - is format specifically json, and is type a encoding/json.Marshaler and Unmarshaler?
-  - is format text-based, and type an encoding.TextMarshaler?
+  - is format text-based, and type an encoding.TextMarshaler and TextUnmarshaler?
   - else we use a pair of functions based on the "kind" of the type e.g. map, slice, int64, etc
 
 This symmetry is important to reduce chances of issues happening because the

+ 1 - 1
codec/README.md

@@ -106,7 +106,7 @@ We determine how to encode or decode by walking this decision tree
   - is there an extension registered for the type?
   - is format binary, and is type a encoding.BinaryMarshaler and BinaryUnmarshaler?
   - is format specifically json, and is type a encoding/json.Marshaler and Unmarshaler?
-  - is format text-based, and type an encoding.TextMarshaler?
+  - is format text-based, and type an encoding.TextMarshaler and TextUnmarshaler?
   - else we use a pair of functions based on the "kind" of the type e.g. map, slice, int64, etc
 
 This symmetry is important to reduce chances of issues happening because the