Tuesday, May 10, 2022

An exception occured when deserializing a parameters - Exception occurred when parsing and deserializing parameter 'record' - 'Error while deserializing contract class

 Hi guys,  I have created the custom service while testing from Json  I am getting the below error :

"An exception occurred when deserializing a parameters - Exception occurred when parsing and deserializing parameter 'record' - 'Error while deserializing contract class"


My JSON File:

{

        "ID": "D0001",

        "EffectiveDate": "2022-06-10",

        "IsTrue": "",

        ''DueDate" :

}

Solution :

This error we are getting because I am passing different data type values to different data type fields.

  • "IsTrue" is the boolean field in my machine but here I am passing String null value.
  •  ''DueDate" is the date type but again I am passing String null value.
Just check your schema file and change the different data type values to the correct data type value.

Correct JSON file:

{

        "ID": "D0001",

        "EffectiveDate": "2022-06-10",

        "IsTrue": "No",

        ''DueDate" : "2023-06-10"

}


Keep Daxing!!

No comments:

Post a Comment