aboutsummaryrefslogtreecommitdiff
path: root/csharp/src/Google.Protobuf/JsonFormatter.cs
diff options
context:
space:
mode:
authorJon Skeet <jonskeet@google.com>2015-08-06 14:29:34 +0100
committerJon Skeet <jonskeet@google.com>2015-08-08 07:25:28 +0100
commit6f300442bc0e5eced5f48820bcd5f24fce9e3867 (patch)
tree26b97843db46795208b7da0568b0d23ec3fc1f8e /csharp/src/Google.Protobuf/JsonFormatter.cs
parentcac45313235bd11b08e0803453a2ec5a7d4b652a (diff)
downloadprotobuf-6f300442bc0e5eced5f48820bcd5f24fce9e3867.tar.gz
protobuf-6f300442bc0e5eced5f48820bcd5f24fce9e3867.tar.bz2
protobuf-6f300442bc0e5eced5f48820bcd5f24fce9e3867.zip
Tidying up - fix a bunch of TODOs and remove outdated ones.
Diffstat (limited to 'csharp/src/Google.Protobuf/JsonFormatter.cs')
-rw-r--r--csharp/src/Google.Protobuf/JsonFormatter.cs3
1 files changed, 1 insertions, 2 deletions
diff --git a/csharp/src/Google.Protobuf/JsonFormatter.cs b/csharp/src/Google.Protobuf/JsonFormatter.cs
index 7c4894be..12bbdfdd 100644
--- a/csharp/src/Google.Protobuf/JsonFormatter.cs
+++ b/csharp/src/Google.Protobuf/JsonFormatter.cs
@@ -158,7 +158,6 @@ namespace Google.Protobuf
{
var accessor = field.Accessor;
// Oneofs are written later
- // TODO: Change to write out fields in order, interleaving oneofs appropriately (as per binary format)
if (field.ContainingOneof != null && field.ContainingOneof.Accessor.GetCaseFieldDescriptor(message) != field)
{
continue;
@@ -425,7 +424,7 @@ namespace Google.Protobuf
if (descriptor.FullName == ListValue.Descriptor.FullName)
{
var fieldAccessor = descriptor.Fields[ListValue.ValuesFieldNumber].Accessor;
- WriteList(builder, fieldAccessor, (IList) fieldAccessor.GetValue(value));
+ WriteList(builder, fieldAccessor, (IList) fieldAccessor.GetValue((IMessage) value));
return;
}
if (descriptor.FullName == Value.Descriptor.FullName)