json error for publish stream using raw transaction api

+1 vote

Hi,

 

I am trying to publish to stream using raw txn but getting JSON error for passing the to-address:amount as an empty object. What may be the issue?

createrawsendfrom node_address '{}' '{"for":"stream_name","key":"key_name","data":"data_hex"}' send

error: Error parsing JSON:'{}'

Note: I am successfully able to send assets between nodes and publish stream all in the same txn if i dont use raw txns.

 

asked Aug 27, 2017 by Vismay

1 Answer

0 votes

First, if you're using Windows, you need different escaping than the documentation shown on the website – please see the README in the Windows download.

Second you need the data parameters inside an array, like this:

'[{"for":"stream3","key":"key1","data":"4f6e65206974656d"}]'

More information in this tutorial: https://www.multichain.com/developers/raw-transactions/

answered Aug 28, 2017 by MultiChain
Thank you, works now :)
...