Here is the context :
I am writing a Python code that converts an HTML page to a PDF file using the instructions in this link. I work now on the POST request that will have as an input an HTML file, and have some parameters precised in the latter link.
The link states that the HTML input file has to be defined by some parameters, grouped in this example:
in this example, I don't get what's the meaning of this part : "json": "[\"a\": \"b\"]"
? and how can I adapt it to my case.
So I am struggling with how to precise the parameter highlighted in yellow in the image above.
Here is the question :
The litterature states concerning this field (cpf:inputs > params > cpf:inline > json
) states the following:
json(string, optional)
JavaScript variables to be placed in global scope to reference while rendering the HTML.
This mechanism is intended to be used to supply data that might otherwise be retrieved using ajax requests.
The actual mechanics of accessing this content varies depending if rendering from a zip file or from a url.
When rendering from a zip file, the source collateral must include a script element such as:
<script src='./json.js' type='text/javascript'></script>
When rendering from a URL, the content of this json object is injected into the browser VM before the page is rendered.
default: {}
It will help if someone can just read and explain to me the meaning of this quoted text above. thanks!