response, err := json.MarshalIndent(simpleResponse, "", " ")
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns1="urn:IJEEwsdl" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<SOAP-ENV:Body>
<ns1:IJEE.test_search>
<user_name xsi:type="xsd:string">kredito</user_name>
<user_password xsi:type="xsd:string">KffUaj34</user_password>
<q_type xsi:type="xsd:string">F</q_type>
<q_query xsi:type="xsd:string">200460105</q_query>
</ns1:IJEE.test_search>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Hi,I'm using the next code to encode the struct to json format:response, err := json.MarshalIndent(simpleResponse, "", " ")And, the produced output is the next:
The original content is the next:<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns1="urn:IJEEwsdl" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<SOAP-ENV:Body>
<ns1:IJEE.test_search>
<user_name xsi:type="xsd:string">kredito</user_name>
<user_password xsi:type="xsd:string">KffUaj34</user_password>
<q_type xsi:type="xsd:string">F</q_type>
<q_query xsi:type="xsd:string">200460105</q_query>
</ns1:IJEE.test_search>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>Question:Could I configure the json Marshal that way, that it would not encode the special characters, like < and >, so I receive the human-friendly output?I haven't found anything that I think can help me in the encoding/json docs.