public void ConvertV2toV3(string v2, string v3) { var expected = JsonConvert.DeserializeObject <JsonVer3>(v3); var version2 = JsonConvert.DeserializeObject <JsonVer2>(v2); var converter = new JsonConverter(); var resolut = converter.ConvertV2toV3(version2); JsonConvert.SerializeObject(resolut).Should().Be(JsonConvert.SerializeObject(expected)); }
public static void Main() { var json = Console.In.ReadToEnd(); var v2 = JsonConvert.DeserializeObject <JsonVer2>(json); var converter = new JsonConverter(); var v3 = converter.ConvertV2toV3(v2); Console.Write(JsonConvert.SerializeObject(v3)); }