diff options
Diffstat (limited to 'csharp/src/Google.Protobuf/JsonFormatter.cs')
-rw-r--r-- | csharp/src/Google.Protobuf/JsonFormatter.cs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/csharp/src/Google.Protobuf/JsonFormatter.cs b/csharp/src/Google.Protobuf/JsonFormatter.cs index 7f13e33e..f624b090 100644 --- a/csharp/src/Google.Protobuf/JsonFormatter.cs +++ b/csharp/src/Google.Protobuf/JsonFormatter.cs @@ -140,7 +140,7 @@ namespace Google.Protobuf var fields = message.Descriptor.Fields; bool first = true; // First non-oneof fields - foreach (var field in fields) + foreach (var field in fields.InFieldNumberOrder()) { var accessor = field.Accessor; // Oneofs are written later |