Open ghost opened 7 years ago
I think it's more straightforward way always use JSON embeddable string representation for embedded JSON objects, that's very usual for import & export sort of stuff. @elaineo what do you think about it?
what's wrong with embedding nested JSON objects? as long as the encoders/decoders can handle it, either way is fine with me.
For me not fully consistent, for example, abi should be just single string field, because it can be several different incompatible versions, better just to separate JSON-RPC method parameters from import & export JSON objects, not to mix them with each other.
ok, makes sense 👍
https://stackoverflow.com/questions/7750399/how-to-encode-json-embedded-within-json
Like
"abi": "[{\"constant\":false,\"inputs\":[{\"name\":\"receiver\",\"type\":\"address\"},{\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"sendLoyaltyPoints\",\"outputs\":[],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"familyMember\",\"type\":\"address\"}],\"name\":\"registerFamilyMember\",\"outputs\":[],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"EmiratesLoyaltyPoints\",\"outputs\":[],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"addr\",\"type\":\"address\"}],\"name\":\"getBalance\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"}]"
.