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

emerald_import* & emerald_export* doesn't embedded JSON objects as plain string values #197

Open
ghost opened this issue Jul 15, 2017 · 4 comments

Comments

@ghost
Copy link

ghost commented Jul 15, 2017

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\"}]".

@ghost
Copy link
Author

ghost commented Jul 15, 2017

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?

@ghost ghost changed the title emerald_import* & emerald_export* doesn't embedded JSON emerald_import* & emerald_export* doesn't embedded JSON objects as plain string value Jul 15, 2017
@ghost ghost changed the title emerald_import* & emerald_export* doesn't embedded JSON objects as plain string value emerald_import* & emerald_export* doesn't embedded JSON objects as plain string values Jul 15, 2017
@elaineo
Copy link
Contributor

elaineo commented Jul 15, 2017

what's wrong with embedding nested JSON objects?
as long as the encoders/decoders can handle it, either way is fine with me.

@ghost
Copy link
Author

ghost commented Jul 15, 2017

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.

@elaineo
Copy link
Contributor

elaineo commented Jul 15, 2017

ok, makes sense 👍

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