307
Views
1
Comments
Rest API Dynamic Structure In Response
Question

Hi,

How to get dynamic structure or dynamic tag data from Rest API??

Suppose i have Rest API which will return list of records if in future that api would be update so in application error will raise and application stops working.

so how can achieve that changes in our application without any changes made.

Thanks & Regards,

Jay

2020-09-15 13-07-23
Kilian Hekhuis
 
MVP

Hi Jay,

If the JSON changes, the application will not raise an error, unless you have incompatible JSON (e.g. changing the data type). REST services accept all JSON, and just try to match whatever structure they expect. So if you send extra attributes, those are just ignored. If you do not send certain attributes, they will get the default value.

That said, what kind of "dynamic" are you looking for? Can you better describe your use case?

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