How to POST via REST a correct markup to a confluence page?
<p>How to post topic in correct wiki syntax when body has "\r\n" which means "carriage return" and "newline"?</p>

<p>When I use data=json.dumps(%topic_body%) it makes all my text with literally "\r\n" in it!</p>

<p>Of course text formatted like this - cannot be used as wiki formatted on confluence!</p>

<p>This is an example of usual markup:</p>

<pre><code>h1. Some Description
[Some link|Link...] is ...

h2. Some

h2. Some Versions
* 9
*  10
*  11

h1. Some Software 

||Table 1 ||Block 1||Some||Some 2||
</code></pre>

<p>This is how it reproduces via json:</p>

<pre><code>{"storage": {"value": "b'h1. Some Description\\r\\n[Some link|Link...] is ...\\r\\n\\r\\nh2. Some\\r\\n\\r\\nh2. Some Versions\\r\\n* 9\\r\\n*  10\\r\\n*  11\\r\\n\\r\\nh1. Some Software \\r\\n\\r\\n||Table 1 ||Block 1||Some||Some 2||'", "representation": "wiki"}}}
</code></pre>

<p>This is important, and I can't send body in markdown because my confluence did not understand this way of macros:</p>

<pre><code>&lt;ac:structured-macro ac:name="attachments"&gt;
&lt;/ac:structured-macro&gt;
</code></pre>

<p>So I need to send my topic body that way, which can include new line method (<a href="https://confluence.atlassian.com/doc/confluence-wiki-markup-251003035.html" rel="nofollow">https://confluence.atlassian.com/doc/confluence-wiki-markup-251003035.html</a>)</p>

<p>Also I can't use documented:</p>

<blockquote>
  <p>Explicitly, by entering two consecutive backslashes:  \\</p>
</blockquote>

<p>Because in this condition wiki markup make all text the same forematted, just like:</p>

<pre><code>h1. Some Description \\ \\ [Some link|Link...] is ...
</code></pre>

<p>This whole string will be "h1." size. All all other text from this string will be formatted as h1, ignoring any other tags.</p>