diff options
author | Pete Warden <pete@petewarden.com> | 2016-03-09 13:05:15 -0800 |
---|---|---|
committer | Pete Warden <pete@petewarden.com> | 2016-03-09 13:05:15 -0800 |
commit | bc2d6c2504b38dda4345e9960948d96102daccc3 (patch) | |
tree | 48ad357a166b3bf9715a20714db8c117d8150c41 /csharp/src/Google.Protobuf/Collections/MapField.cs | |
parent | f0c1a8637218a03a083901493c9b3acdb6e5db57 (diff) | |
parent | 48ebb29a8ec118bf6b9ee39f6be42b57321c099a (diff) | |
download | protobuf-bc2d6c2504b38dda4345e9960948d96102daccc3.tar.gz protobuf-bc2d6c2504b38dda4345e9960948d96102daccc3.tar.bz2 protobuf-bc2d6c2504b38dda4345e9960948d96102daccc3.zip |
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'csharp/src/Google.Protobuf/Collections/MapField.cs')
-rw-r--r-- | csharp/src/Google.Protobuf/Collections/MapField.cs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/csharp/src/Google.Protobuf/Collections/MapField.cs b/csharp/src/Google.Protobuf/Collections/MapField.cs index 90a5ff1a..993a89d7 100644 --- a/csharp/src/Google.Protobuf/Collections/MapField.cs +++ b/csharp/src/Google.Protobuf/Collections/MapField.cs @@ -34,6 +34,7 @@ using Google.Protobuf.Reflection; using System; using System.Collections; using System.Collections.Generic; +using System.IO; using System.Linq; using System.Text; using Google.Protobuf.Compatibility; @@ -474,9 +475,9 @@ namespace Google.Protobuf.Collections /// </summary> public override string ToString() { - var builder = new StringBuilder(); - JsonFormatter.Default.WriteDictionary(builder, this); - return builder.ToString(); + var writer = new StringWriter(); + JsonFormatter.Default.WriteDictionary(writer, this); + return writer.ToString(); } #region IDictionary explicit interface implementation |