diff options
author | Jon Skeet <jonskeet@google.com> | 2016-04-29 10:10:40 +0100 |
---|---|---|
committer | Jon Skeet <jonskeet@google.com> | 2016-04-29 10:20:03 +0100 |
commit | 61307b86f561721ac47ecd74d9fd1dffa0acad53 (patch) | |
tree | bda7a9541f0639d05bfb9b1c0acde474e8e14133 /csharp/src/Google.Protobuf/JsonParser.cs | |
parent | b53417c7356deab70f44b60bd7e6270023ddc3b6 (diff) |
Allow custom type URL prefixes in Any.Pack
(And likewise ignore the prefix in unpack.)
Fixes issue #1459.
Diffstat (limited to 'csharp/src/Google.Protobuf/JsonParser.cs')
-rw-r--r-- | csharp/src/Google.Protobuf/JsonParser.cs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/csharp/src/Google.Protobuf/JsonParser.cs b/csharp/src/Google.Protobuf/JsonParser.cs index 80d3013d..d738ebb0 100644 --- a/csharp/src/Google.Protobuf/JsonParser.cs +++ b/csharp/src/Google.Protobuf/JsonParser.cs @@ -513,7 +513,7 @@ namespace Google.Protobuf throw new InvalidProtocolBufferException("Expected string value for Any.@type"); } string typeUrl = token.StringValue; - string typeName = JsonFormatter.GetTypeName(typeUrl); + string typeName = Any.GetTypeName(typeUrl); MessageDescriptor descriptor = settings.TypeRegistry.Find(typeName); if (descriptor == null) |