-
Notifications
You must be signed in to change notification settings - Fork 112
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix a nasty encoding corner case with JsonValue.
The json encoding code in protorpc had a bit of custom logic to handle the case of repeated vs. non-repeated fields with the same line of code. However, in the case of a JsonValue (aka `any` type in a discovery doc), it's possible for a non-repeated value to itself be a list. In this case, we'd always deserialize the whole list, and then ... only use the last value. The fix here is to actually simplify the code a bit, and split the logic based on whether the field is repeated, *not* whether the value is itself a list. Also added a simple test.
- Loading branch information
1 parent
58dfc18
commit 3f14c91
Showing
2 changed files
with
22 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters