Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to use "args" as JSON instead of array of strings (i.e. [] string ) #120

Open
mna2016 opened this issue Jul 25, 2017 · 0 comments
Open

Comments

@mna2016
Copy link

mna2016 commented Jul 25, 2017

Hi All,
I am trying to modify the chaincode vehicles.go in order to have "args" parameter of an incoming invoke statement as a JSON instead of array of string. I want the request to look like below:

{ 
	"jsonrpc": "2.0", 
	"method": "invoke", 
	"params": 
		{ 	"type": 1, 
			"chaincodeID": 
	        { "name": "fe4ffc3aff02c2dda7a61f18d934c84474edecd4fe1ade6c5181f541afd936bff01bc6b3066f349b5caed6aa0f1a74e31d47ee82929d3157194f441afa171ff2" }, 
			"ctorMsg": 
						{ 
							"function": "update_xxx", 
							"args": {"make":"HONDA", "vin":"MOD123", "color":"RED", "owner":"DVLA"} 
						}, 
	"secureContext": "WebAppAdmin" 
		}, 
"id":1234 
}
  1. How to update the vehicles.go in order to achieve this?
  2. Is there any other place where I need to make change in order to accept this new invoke API call structure?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant