"Unable to parse json request" error in validation service
hello,
getting an error "Unable To Parse JSON Request" while adding membership plan through mashup.
i have one code which gives me existing existing plan name in database and i my another code is validation service created for the mashup where i wanted to compare plan name present in database with the validation service input plan name.
Now when i click on add button it gives me an error "Unable To Parse JSON Request" i dont know why i am getting this error. below is my validation service code:-
// result: INFOTABLE dataShape: ""
let resultName = Things["PostgreSQL_DB"].getPlanName({
plan_name: plan_name /* STRING */
});
// result: BOOLEAN
let Priceresult = me.validateInteger({
number: Price /* STRING */
});
if(plan_name == "" || plan_name == null){
result = 'Please enter Plan Name';
}
else if(resultName.plan_name == plan_name){
result = 'Plan is already exist';
}
//else if(resultName.count > 0)
//{
// result = 'membership plan name is already exist';
//}
else if(Price == "" || Price == null){
result = 'Please enter Price';
}
else if(Priceresult == false){
result = 'Please enter price in number';
}
else if(plan_type_id == "" || plan_type_id == null){
result = 'Please select plan type';
}
else if(plan_type_id == 1){
result= '';
}
else if(plan_type_id == 2){
if(MembershipLength == "" || MembershipLength == null){
result = 'Please enter number of days';
}
else if(frequency_unit == "" || frequency_unit == null){
result = 'Please select membership length';
}
else{
result= '';
}
}
else if(plan_type_id == 3){
if(FromDate == "" || FromDate == null){
result = 'Please select From date';
}
else if(ToDate == "" || ToDate == null){
result = 'Please select To date';
}
else{
result= '';
}
}

