Locoia
Search…
FAQ

1. Dictionary to JSON conversion

Q: I expect to send JSON, but actually do send some single quoted data, like a Dictionary - what can I do? Wrong example reference: `{ "contacts": [ {{ my_contact_details }} ] }`
Wrong example result:
1
{
2
"contacts": [ {
3
'id': 'XXXXXX',
4
'title': 'PJ',
5
'salutation': 'Mrs',
6
...
Copied!
A: Please add | jsonify to convert a Dictionary to JSON. So correctly it is: { "contacts": [ {{ my_contact_details | jsonify }} ] }
Last modified 19d ago
Copy link