<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>

CC BY-SA 3.0
2017-03-04T10:50:50.223Z
2017-03-04T10:50:50.223Z
Murch
<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>

CC BY-SA 3.0
2017-03-03T18:36:54.187Z
2017-03-03T18:36:54.187Z
Nick ODell
<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.sstatic.net/oCLOh.jpg" alt="img"></p>

<p>Does anyone have an idea what I'm doing wrong?</p>

<json-rpc><testnet><windows><bitcoin-cli><createrawtransaction>
bitcoin-cli commands like createrawtransaction not working with json on command line
Amzad Raza Khan
# bitcoin-cli commands like createrawtransaction not working with json on command line

(Asked by: username_0 on 2017-03-03)

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:'[{

```

![img](https://i.sstatic.net/oCLOh.jpg)

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

**Tags:** json-rpc, testnet, windows, bitcoin-cli, createrawtransaction


---

## 2 answers

### Answer by username_1 on 2017-03-04. Score: 5

When looking at the [Bitcoin Developer Reference](https://bitcoin.org/en/developer-reference#createrawtransaction) 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.


---

### Answer by username_2 on 2017-03-03. Score: 4

Try rewriting your command to

```
bitcoin-cli -testnet createrawtransaction "[{\"txid\": \"12b8e7ede4992f4d30f93idj3085746951d945e39f40becebd7c290af8c2e7ad\", \"vout\": 0}]" "{\"mxh3H416KCRoBDiweSESew5YJyAk1nxLrN\": 0.025, \"mkrzDhhZtzQm8zgckSs4fMNrvtNJ66zaFe\": 0.0245}"

```

as suggested by [this thread.](https://bitcointalk.org/index.php?topic=104512.0)


---

