JSON Parameter Parsing Error
Symptoms
JSON parameters are not replaced or parsed as expected during the Ansible application deployment.
- Input parameters: {"key":"jsonkey","value":"jsonvalue"}
- Parameters after replacement: {u'value': u'jsonvalue', u'key': u'jsonkey'}
Solution
Enclose JSON parameters with single quotation marks. The template module will forcibly parse the parameters in character string mode to ensure correct replacement. The following is an example:
- Input parameters: {"key":"jsonkey","value":"jsonvalue"}
- Parameters after replacement: {"key":"jsonkey","value":"jsonvalue"}
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot