Error parsing JSON for issue command when providing params to describe new asset

+1 vote

Hello!

I am running 1.0 Alpha 18 and trying to create an 'open' asset. The command I am using is:

multichain-cli GBP issue 1B7Zq1Zgie9EeqAiFgKruXA5V8QEXZcHox7Ku8 {"name":"dGBP","open":true} 100 0.01 0 {"reference": "first"}

error: Error parsing JSON:open:true


I have been able to issue simple assets (just supplying the asset name instead of an object), and the reference (which is in the same format) it recorded fine. For example when I put quotes around the params object the whole thing get stored as the name...

{
        "name" : "\"name\":\"dGBP2\",\"open\":false",
        "issuetxid" : "f4e3c69189c46a3f1079a1f7da88a8bc7b6fff81a876a39ad3dc1ea800cc6b89",
        "assetref" : "1891-267-58356",
        "multiple" : 100,
        "units" : 0.01000000,
        "details" : {
            "reference" : "hello world"
        },
        "issueqty" : 100.00000000,
        "issueraw" : 10000
    }


I have tried just about every variation I can think of that might work. Any help will be much appreciated!

asked Mar 17, 2016 by James Adams

1 Answer

0 votes
 
Best answer

Yes, it can be a little tricky! Here's the format you need, using single quotes around the JSON:

multichain-cli GBP issue 1B7Zq1Zgie9EeqAiFgKruXA5V8QEXZcHox7Ku8 '{"name":"dGBP","open":true}' 100 0.01 0 '{"reference":"first"}'

This is just a consequence of how the Linux command line works.

answered Mar 17, 2016 by MultiChain
...