THRIFT-323. csharp: TJSONProtocol
This patch adds support for the JSON Protocol to the csharp library.
Patch: Roger Meier
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@998539 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/lib/csharp/src/Protocol/TProtocol.cs b/lib/csharp/src/Protocol/TProtocol.cs
index 27c7dc1..4f723dd 100644
--- a/lib/csharp/src/Protocol/TProtocol.cs
+++ b/lib/csharp/src/Protocol/TProtocol.cs
@@ -60,7 +60,7 @@
public abstract void WriteI32(int i32);
public abstract void WriteI64(long i64);
public abstract void WriteDouble(double d);
- public void WriteString(string s) {
+ public virtual void WriteString(string s) {
WriteBinary(Encoding.UTF8.GetBytes(s));
}
public abstract void WriteBinary(byte[] b);
@@ -83,7 +83,7 @@
public abstract int ReadI32();
public abstract long ReadI64();
public abstract double ReadDouble();
- public string ReadString() {
+ public virtual string ReadString() {
return Encoding.UTF8.GetString(ReadBinary());
}
public abstract byte[] ReadBinary();