From d58733fb8fce888fe139ae8629d4b5a72b45c38f Mon Sep 17 00:00:00 2001 From: Daniel Kao Date: Fri, 30 May 2025 18:04:24 -0700 Subject: [PATCH 1/3] Fix field number in expanded repeated field example --- content/programming-guides/encoding.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/content/programming-guides/encoding.md b/content/programming-guides/encoding.md index 3a7c05264..03cf0fb18 100644 --- a/content/programming-guides/encoding.md +++ b/content/programming-guides/encoding.md @@ -340,10 +340,10 @@ records for the same field with respect to each other is preserved. Thus, this could look like the following: ```proto -5: 1 -5: 2 +6: 1 +6: 2 4: {"hello"} -5: 3 +6: 3 ``` Only repeated fields of primitive numeric types can be declared "packed". These From 7a312663e9453bd68da1de1209c513cbb9367e65 Mon Sep 17 00:00:00 2001 From: Daniel Kao Date: Fri, 30 May 2025 18:25:44 -0700 Subject: [PATCH 2/3] Make repeated field example values consistent --- content/programming-guides/encoding.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/content/programming-guides/encoding.md b/content/programming-guides/encoding.md index 03cf0fb18..68367ae42 100644 --- a/content/programming-guides/encoding.md +++ b/content/programming-guides/encoding.md @@ -324,7 +324,7 @@ message Test4 { ``` and we construct a `Test4` message with `d` set to `"hello"`, and `e` set to -`1`, `2`, and `3`, this *could* be encoded as `` `3206038e029ea705` ``, or +`3`, `270`, and `86942`, this *could* be encoded as `` `3206038e029ea705` ``, or written out as Protoscope, ```proto @@ -340,10 +340,10 @@ records for the same field with respect to each other is preserved. Thus, this could look like the following: ```proto -6: 1 -6: 2 -4: {"hello"} 6: 3 +6: 270 +4: {"hello"} +6: 86942 ``` Only repeated fields of primitive numeric types can be declared "packed". These From b34c489b5ab005f742af6499fe94a8c5be6f0152 Mon Sep 17 00:00:00 2001 From: Daniel Kao Date: Fri, 30 May 2025 18:43:54 -0700 Subject: [PATCH 3/3] Add the 4: {"hello"} part to repeated field encoding example --- content/programming-guides/encoding.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/programming-guides/encoding.md b/content/programming-guides/encoding.md index 68367ae42..43da37c5e 100644 --- a/content/programming-guides/encoding.md +++ b/content/programming-guides/encoding.md @@ -324,7 +324,7 @@ message Test4 { ``` and we construct a `Test4` message with `d` set to `"hello"`, and `e` set to -`3`, `270`, and `86942`, this *could* be encoded as `` `3206038e029ea705` ``, or +`3`, `270`, and `86942`, this *could* be encoded as `` `220568656C6C6F3206038e029ea705` ``, or written out as Protoscope, ```proto