Skip to content

Commit

Permalink
use WriteRawValue instead of WriteRaw (#7830)
Browse files Browse the repository at this point in the history
  • Loading branch information
wing328 authored Oct 29, 2020
1 parent ab93cec commit 0e994ea
Show file tree
Hide file tree
Showing 22 changed files with 22 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@
/// <param name="serializer">JSON Serializer</param>
public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer)
{
writer.WriteRaw((String)(typeof({{classname}}).GetMethod("ToJson").Invoke(value, null)));
writer.WriteRawValue((String)(typeof({{classname}}).GetMethod("ToJson").Invoke(value, null)));
}

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@
/// <param name="serializer">JSON Serializer</param>
public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer)
{
writer.WriteRaw((String)(typeof({{classname}}).GetMethod("ToJson").Invoke(value, null)));
writer.WriteRawValue((String)(typeof({{classname}}).GetMethod("ToJson").Invoke(value, null)));
}

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ public class FruitJsonConverter : JsonConverter
/// <param name="serializer">JSON Serializer</param>
public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer)
{
writer.WriteRaw((String)(typeof(Fruit).GetMethod("ToJson").Invoke(value, null)));
writer.WriteRawValue((String)(typeof(Fruit).GetMethod("ToJson").Invoke(value, null)));
}

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ public class FruitReqJsonConverter : JsonConverter
/// <param name="serializer">JSON Serializer</param>
public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer)
{
writer.WriteRaw((String)(typeof(FruitReq).GetMethod("ToJson").Invoke(value, null)));
writer.WriteRawValue((String)(typeof(FruitReq).GetMethod("ToJson").Invoke(value, null)));
}

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ public class GmFruitJsonConverter : JsonConverter
/// <param name="serializer">JSON Serializer</param>
public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer)
{
writer.WriteRaw((String)(typeof(GmFruit).GetMethod("ToJson").Invoke(value, null)));
writer.WriteRawValue((String)(typeof(GmFruit).GetMethod("ToJson").Invoke(value, null)));
}

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ public class MammalJsonConverter : JsonConverter
/// <param name="serializer">JSON Serializer</param>
public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer)
{
writer.WriteRaw((String)(typeof(Mammal).GetMethod("ToJson").Invoke(value, null)));
writer.WriteRawValue((String)(typeof(Mammal).GetMethod("ToJson").Invoke(value, null)));
}

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ public class NullableShapeJsonConverter : JsonConverter
/// <param name="serializer">JSON Serializer</param>
public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer)
{
writer.WriteRaw((String)(typeof(NullableShape).GetMethod("ToJson").Invoke(value, null)));
writer.WriteRawValue((String)(typeof(NullableShape).GetMethod("ToJson").Invoke(value, null)));
}

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ public class PigJsonConverter : JsonConverter
/// <param name="serializer">JSON Serializer</param>
public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer)
{
writer.WriteRaw((String)(typeof(Pig).GetMethod("ToJson").Invoke(value, null)));
writer.WriteRawValue((String)(typeof(Pig).GetMethod("ToJson").Invoke(value, null)));
}

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ public class QuadrilateralJsonConverter : JsonConverter
/// <param name="serializer">JSON Serializer</param>
public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer)
{
writer.WriteRaw((String)(typeof(Quadrilateral).GetMethod("ToJson").Invoke(value, null)));
writer.WriteRawValue((String)(typeof(Quadrilateral).GetMethod("ToJson").Invoke(value, null)));
}

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ public class ShapeJsonConverter : JsonConverter
/// <param name="serializer">JSON Serializer</param>
public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer)
{
writer.WriteRaw((String)(typeof(Shape).GetMethod("ToJson").Invoke(value, null)));
writer.WriteRawValue((String)(typeof(Shape).GetMethod("ToJson").Invoke(value, null)));
}

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ public class ShapeOrNullJsonConverter : JsonConverter
/// <param name="serializer">JSON Serializer</param>
public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer)
{
writer.WriteRaw((String)(typeof(ShapeOrNull).GetMethod("ToJson").Invoke(value, null)));
writer.WriteRawValue((String)(typeof(ShapeOrNull).GetMethod("ToJson").Invoke(value, null)));
}

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ public class TriangleJsonConverter : JsonConverter
/// <param name="serializer">JSON Serializer</param>
public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer)
{
writer.WriteRaw((String)(typeof(Triangle).GetMethod("ToJson").Invoke(value, null)));
writer.WriteRawValue((String)(typeof(Triangle).GetMethod("ToJson").Invoke(value, null)));
}

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ public class FruitJsonConverter : JsonConverter
/// <param name="serializer">JSON Serializer</param>
public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer)
{
writer.WriteRaw((String)(typeof(Fruit).GetMethod("ToJson").Invoke(value, null)));
writer.WriteRawValue((String)(typeof(Fruit).GetMethod("ToJson").Invoke(value, null)));
}

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ public class FruitReqJsonConverter : JsonConverter
/// <param name="serializer">JSON Serializer</param>
public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer)
{
writer.WriteRaw((String)(typeof(FruitReq).GetMethod("ToJson").Invoke(value, null)));
writer.WriteRawValue((String)(typeof(FruitReq).GetMethod("ToJson").Invoke(value, null)));
}

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ public class GmFruitJsonConverter : JsonConverter
/// <param name="serializer">JSON Serializer</param>
public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer)
{
writer.WriteRaw((String)(typeof(GmFruit).GetMethod("ToJson").Invoke(value, null)));
writer.WriteRawValue((String)(typeof(GmFruit).GetMethod("ToJson").Invoke(value, null)));
}

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ public class MammalJsonConverter : JsonConverter
/// <param name="serializer">JSON Serializer</param>
public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer)
{
writer.WriteRaw((String)(typeof(Mammal).GetMethod("ToJson").Invoke(value, null)));
writer.WriteRawValue((String)(typeof(Mammal).GetMethod("ToJson").Invoke(value, null)));
}

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ public class NullableShapeJsonConverter : JsonConverter
/// <param name="serializer">JSON Serializer</param>
public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer)
{
writer.WriteRaw((String)(typeof(NullableShape).GetMethod("ToJson").Invoke(value, null)));
writer.WriteRawValue((String)(typeof(NullableShape).GetMethod("ToJson").Invoke(value, null)));
}

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ public class PigJsonConverter : JsonConverter
/// <param name="serializer">JSON Serializer</param>
public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer)
{
writer.WriteRaw((String)(typeof(Pig).GetMethod("ToJson").Invoke(value, null)));
writer.WriteRawValue((String)(typeof(Pig).GetMethod("ToJson").Invoke(value, null)));
}

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ public class QuadrilateralJsonConverter : JsonConverter
/// <param name="serializer">JSON Serializer</param>
public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer)
{
writer.WriteRaw((String)(typeof(Quadrilateral).GetMethod("ToJson").Invoke(value, null)));
writer.WriteRawValue((String)(typeof(Quadrilateral).GetMethod("ToJson").Invoke(value, null)));
}

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ public class ShapeJsonConverter : JsonConverter
/// <param name="serializer">JSON Serializer</param>
public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer)
{
writer.WriteRaw((String)(typeof(Shape).GetMethod("ToJson").Invoke(value, null)));
writer.WriteRawValue((String)(typeof(Shape).GetMethod("ToJson").Invoke(value, null)));
}

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ public class ShapeOrNullJsonConverter : JsonConverter
/// <param name="serializer">JSON Serializer</param>
public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer)
{
writer.WriteRaw((String)(typeof(ShapeOrNull).GetMethod("ToJson").Invoke(value, null)));
writer.WriteRawValue((String)(typeof(ShapeOrNull).GetMethod("ToJson").Invoke(value, null)));
}

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ public class TriangleJsonConverter : JsonConverter
/// <param name="serializer">JSON Serializer</param>
public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer)
{
writer.WriteRaw((String)(typeof(Triangle).GetMethod("ToJson").Invoke(value, null)));
writer.WriteRawValue((String)(typeof(Triangle).GetMethod("ToJson").Invoke(value, null)));
}

/// <summary>
Expand Down

0 comments on commit 0e994ea

Please sign in to comment.