1- using Newtonsoft . Json ;
1+ using PayNLSdk . Utilities ;
22using PAYNLFormsApp . Fixtures ;
33using PAYNLSDK . API ;
44using PAYNLSDK . Exceptions ;
@@ -133,7 +133,7 @@ private void transactionStartproductsToolStripMenuItem_Click(object sender, Even
133133 //string qs = fixture.ToQueryString();
134134 //AddDebug(qs);
135135 //NameValueCollection nvc = HttpUtility.ParseQueryString(qs);
136- //string json = JsonConvert.SerializeObject (NvcToDictionary(nvc, true));
136+ //string json = JsonSerialization.Serialize (NvcToDictionary(nvc, true));
137137 AddDebug ( "-----" ) ;
138138 //DumpNvc(nvc);
139139 AddDebug ( "-----" ) ;
@@ -249,8 +249,8 @@ private void Form1_Load(object sender, EventArgs e)
249249 AddDebug(PAYNLSDK.Enums.Util.ToEnumString(PAYNLSDK.Enums.TaxClass.High, typeof(PAYNLSDK.Enums.TaxClass)));
250250
251251 string ser = @"{'gender':'m'}";
252- X x = JsonConvert.DeserializeObject <X>(ser);
253- AddDebug(JsonConvert.SerializeObject (x));
252+ X x = JsonSerialization.Deserialize <X>(ser);
253+ AddDebug(JsonSerialization.Serialize (x));
254254 */
255255 }
256256
@@ -379,7 +379,7 @@ private void testDateTimeConversionToolStripMenuItem_Click(object sender, EventA
379379 AddDebug ( "Can not test this use case" ) ;
380380 // try
381381 // {
382- // TestYMD testObj = JsonConvert.DeserializeObject <TestYMD>(dateString);
382+ // TestYMD testObj = JsonSerialization.Deserialize <TestYMD>(dateString);
383383 // AddDebug(String.Format("Converted '{0}' to {1}.", dateString, testObj.DT.ToString()));
384384 // }
385385 // catch (Exception e0)
@@ -392,7 +392,7 @@ private void testDateTimeConversionToolStripMenuItem_Click(object sender, EventA
392392 //{
393393 // try
394394 // {
395- // TestDMY testObj = JsonConvert.DeserializeObject <TestDMY>(dateString);
395+ // TestDMY testObj = JsonSerialization.Deserialize <TestDMY>(dateString);
396396 // AddDebug(String.Format("Converted '{0}' to {1}.", dateString, testObj.DT.ToString()));
397397 // }
398398 // catch (Exception e1)
@@ -405,7 +405,7 @@ private void testDateTimeConversionToolStripMenuItem_Click(object sender, EventA
405405 //{
406406 // try
407407 // {
408- // TestYMDHIS testObj = JsonConvert.DeserializeObject <TestYMDHIS>(dateString);
408+ // TestYMDHIS testObj = JsonSerialization.Deserialize <TestYMDHIS>(dateString);
409409 // AddDebug(String.Format("Converted '{0}' to {1}.", dateString, testObj.DT.ToString()));
410410 // }
411411 // catch (Exception e2)
@@ -429,7 +429,7 @@ private void refundtransactionToolStripMenuItem_Click(object sender, EventArgs e
429429 //string qs = fixture.ToQueryString();
430430 //AddDebug(qs);
431431 //NameValueCollection nvc = HttpUtility.ParseQueryString(qs);
432- //string json = JsonConvert.SerializeObject (NvcToDictionary(nvc, true));
432+ //string json = JsonSerialization.Serialize (NvcToDictionary(nvc, true));
433433 AddDebug ( "-----" ) ;
434434 //AddDebug("PARAMS AS JSON");
435435 //AddDebug(json);
@@ -450,7 +450,7 @@ private void refundTrasactionProductsToolStripMenuItem_Click(object sender, Even
450450 //string qs = fixture.ToQueryString();
451451 //AddDebug(qs);
452452 //NameValueCollection nvc = HttpUtility.ParseQueryString(qs);
453- //string json = JsonConvert.SerializeObject (NvcToDictionary(nvc, true));
453+ //string json = JsonSerialization.Serialize (NvcToDictionary(nvc, true));
454454 //AddDebug("-----");
455455 ////AddDebug("PARAMS AS JSON");
456456 ////AddDebug(json);
@@ -481,7 +481,7 @@ private void refundInfoToolStripMenuItem_Click(object sender, EventArgs e)
481481 /*
482482 class X
483483 {
484- [JsonProperty ("gender"), JsonConverter(typeof(PAYNLSDK.Converters.GenderConverter))]
484+ [JsonPropertyName ("gender"), JsonConverter(typeof(PAYNLSDK.Converters.GenderConverter))]
485485 public PAYNLSDK.Enums.Gender Gender { get; set; }
486486
487487 }
@@ -493,7 +493,7 @@ class X
493493 // /// <summary>
494494 // /// Merchant ID
495495 // /// </summary>
496- // [JsonProperty ("dt"), JsonConverter(typeof(PAYNLSDK.Converters.YMDConverter))]
496+ // [JsonPropertyName ("dt"), JsonConverter(typeof(PAYNLSDK.Converters.YMDConverter))]
497497 // public DateTime? DT { get; set; }
498498
499499 //}
@@ -502,7 +502,7 @@ class X
502502 // /// <summary>
503503 // /// Merchant ID
504504 // /// </summary>
505- // [JsonProperty ("dt"), JsonConverter(typeof(PAYNLSDK.Converters.DMYConverter))]
505+ // [JsonPropertyName ("dt"), JsonConverter(typeof(PAYNLSDK.Converters.DMYConverter))]
506506 // public DateTime? DT { get; set; }
507507 //}
508508
@@ -511,7 +511,7 @@ class X
511511 // /// <summary>
512512 // /// Merchant ID
513513 // /// </summary>
514- // [JsonProperty ("dt"), JsonConverter(typeof(PAYNLSDK.Converters.YMDHISConverter))]
514+ // [JsonPropertyName ("dt"), JsonConverter(typeof(PAYNLSDK.Converters.YMDHISConverter))]
515515 // public DateTime? DT { get; set; }
516516
517517 //}
0 commit comments