My goal is to create a basic model that can accept a JSON string instead of defining all variables/elements upfront. The model will have an "options" element which will hold a JSON string. Below is the structure of my model.
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "GroceryStoreInputModel",
"type": "object",
"properties": {
"options":{"type":"string"}
}
}
In my api-gateway, I found that it works if I provide a simple body like this:
{"options":"this is my options"}
However, I encountered a model not matching error when I replaced the string with a json string like this:
{"options":"{\"name\":\"thaison\",\"mail\":\"test2\"}"}
I also attempted to escape double quotes but it did not solve the issue. Is there a better way to approach this?
{"options":"{\"name\":\"thaison\",\"mail\":\"test2\"}"}