Hi everyone,
I am trying to create a structure from json but getting the below error. The Json I am using is valid. How do I fix this?
The error message indicates that the issue in your JSON lies with the presence of empty "Metadata" objects. the parameters for this object should be present even if the value is null. If you don't need the metadata, you can just remove the metadata object from the json structure and it should work
yes, i was experiencing the same and remove all the metadata.
But i am not sure, if there is a response from rest api with the metadata then deserialize it into the structure, does it still work? no error?
thanks
This worked! thanks!
I believe that if the "response" structure in OutSystems does not precisely match the structure of the actual API response body, OutSystems will still attempt to map the corresponding objects and parameters present in both structures. It seems that, in such cases, OutSystems may handle the mapping gracefully without triggering errors. However, to confirm this, I would need to conduct thorough testing. As of now, I haven't encountered a scenario where only specific portions of the API response are required.
thanks,
this is mainly the use case of consuming 3rd party API (say it Stripe for payment gateway), the response object is so excessive and i cannot find the complete one (the response in json format that is has complete value for each field- not null), and the response return also only some of the fields if we test it. So, we only copy part of the response to be structures, and for another scenario may be the stripe will also return another field that is not in the structure created before.
regards
Hello Simran,
As I can see you have to put some values in the structure may be just sample values for the structure to create.
Thank you
Neha