user46858: I am trying to create raw transaction using the createrawtransaction api on testnet using the Windows7 command line. I always get an "error parsing JSON":
C:\Users\amjad>bitcoin-cli -testnet createrawtransaction '[{ "txid" : "12b8e7ede
4992f4d30f93idj3085746951d945e39f40becebd7c290af8c2e7ad", "vout" : 0 }]' '{"mxh3
H416KCRoBDiweSESew5YJyAk1nxLrN": 0.025, "mkrzDhhZtzQm8zgckSs4fMNrvtNJ66zaFe": 0.
0245}'
error: Error parsing JSON:'[{


Does anyone have an idea what I'm doing wrong?

user2306: Try rewriting your command to
bitcoin-cli -testnet createrawtransaction "[{\"txid\": \"12b8e7ede4992f4d30f93idj3085746951d945e39f40becebd7c290af8c2e7ad\", \"vout\": 0}]" "{\"mxh3H416KCRoBDiweSESew5YJyAk1nxLrN\": 0.025, \"mkrzDhhZtzQm8zgckSs4fMNrvtNJ66zaFe\": 0.0245}"

as suggested by this thread.

user5406: When looking at the Bitcoin Developer Reference I saw an example where they use two additional '' before and after the list of inputs in comparison to you. For your input, I also got "Error parsing JSON", but with
bitcoin-cli -testnet createrawtransaction '''[{ "txid" : "12b8e7ede4992f4d30f93idj3085746951d945e39f40becebd7c290af8c2e7ad", "vout" : 0 }]''' '{"mxh3H416KCRoBDiweSESew5YJyAk1nxLrN": 0.025, "mkrzDhhZtzQm8zgckSs4fMNrvtNJ66zaFe": 0.0245}'

it parsed correctly.

46858: <p>I am trying to create raw transaction using the <code>createrawtransaction</code> api on testnet using the Windows7 command line. I always get an "error parsing JSON":</p>

<pre><code>C:\Users\amjad&gt;bitcoin-cli -testnet createrawtransaction '[{ "txid" : "12b8e7ede
4992f4d30f93idj3085746951d945e39f40becebd7c290af8c2e7ad", "vout" : 0 }]' '{"mxh3
H416KCRoBDiweSESew5YJyAk1nxLrN": 0.025, "mkrzDhhZtzQm8zgckSs4fMNrvtNJ66zaFe": 0.
0245}'
error: Error parsing JSON:'[{
</code></pre>

<p><img src="https://i.stack.imgur.com/oCLOh.jpg" alt="img"></p>

<p>Does anyone have an idea what I'm doing wrong?</p>
 2306: <p>Try rewriting your command to</p>

<pre><code>bitcoin-cli -testnet createrawtransaction "[{\"txid\": \"12b8e7ede4992f4d30f93idj3085746951d945e39f40becebd7c290af8c2e7ad\", \"vout\": 0}]" "{\"mxh3H416KCRoBDiweSESew5YJyAk1nxLrN\": 0.025, \"mkrzDhhZtzQm8zgckSs4fMNrvtNJ66zaFe\": 0.0245}"
</code></pre>

<p>as suggested by <a href="https://bitcointalk.org/index.php?topic=104512.0" rel="nofollow noreferrer">this thread.</a></p>
 5406: <p>When looking at the <a href="https://bitcoin.org/en/developer-reference#createrawtransaction" rel="noreferrer">Bitcoin Developer Reference</a> I saw an example where they use two additional <code>''</code> before and after the list of inputs in comparison to you. For your input, I also got "Error parsing JSON", but with</p>

<pre><code>bitcoin-cli -testnet createrawtransaction '''[{ "txid" : "12b8e7ede4992f4d30f93idj3085746951d945e39f40becebd7c290af8c2e7ad", "vout" : 0 }]''' '{"mxh3H416KCRoBDiweSESew5YJyAk1nxLrN": 0.025, "mkrzDhhZtzQm8zgckSs4fMNrvtNJ66zaFe": 0.0245}'
</code></pre>

<p>it parsed correctly.</p>
