aboutsummaryrefslogtreecommitdiff
path: root/csharp/src/Google.Protobuf/Collections/MapField.cs
diff options
context:
space:
mode:
authorJosh Haberman <jhaberman@gmail.com>2016-03-29 16:24:35 -0700
committerJosh Haberman <jhaberman@gmail.com>2016-03-29 16:24:35 -0700
commita15b916c419000565384a78224e402ed925e5fc8 (patch)
treed0bd6aa4648fddbb08d35d8b78dba32958ae7b51 /csharp/src/Google.Protobuf/Collections/MapField.cs
parent67c727cd411a339eb4233c84d9a1afadd8c20566 (diff)
parent261ee021f640ea6fe67aaf1f53e1518ed154cad0 (diff)
downloadprotobuf-a15b916c419000565384a78224e402ed925e5fc8.tar.gz
protobuf-a15b916c419000565384a78224e402ed925e5fc8.tar.bz2
protobuf-a15b916c419000565384a78224e402ed925e5fc8.zip
Merge branch 'master' into docker
Diffstat (limited to 'csharp/src/Google.Protobuf/Collections/MapField.cs')
-rw-r--r--csharp/src/Google.Protobuf/Collections/MapField.cs7
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