161
Views
1
Comments
How to send a empty array to JSON request to the API?
Application Type
Traditional Web

I need to send empty array ("support":{}) to the request payload of API if there are no values assigned to the attributes of the array. 

There are some attributes in which I've set the "send Default Value" to yes because that is also needed.

What can I do now?

2018-10-29 08-31-03
João Marques
 
MVP

Hi Abhishek,


There are several points in your comment, which raise questions:

  • "support":{} is not an empty array, "support":[] is an empty array. Are you sure you want an empty array or an empty element? If you want the first, then the element to be sent should be a support structure and have its attributes with Send Default Value to False. If you want the second, then the element to be sent should be a list called support.
  • If you have attributes that you don't want to send the default attribute then the Send Default Value should be set to False.


Kind Regards,
João

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.