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

Callback response formatting #2

Open
shamo42 opened this issue Mar 20, 2019 · 1 comment
Open

Callback response formatting #2

shamo42 opened this issue Mar 20, 2019 · 1 comment

Comments

@shamo42
Copy link

shamo42 commented Mar 20, 2019

Awesome service! About the issue, the response string contains some characters that make it difficult for JSON libraries to parse it properly:

  • some extra \n
  • \" instead of "
  • "{ instead of {
  • }" instead of }

This is the response I get:

{"hash": "A3B74654AC5BEBCA1EAD3EDEDAC4EA73A907B30CF9724E20987F0ACD4C78BB55", "account": "xrb_38j81fhhd4qn58k8sps5drn3ubqymcyx7jw5ixftg57kxdem5qbt4h3cnnng", "block": "{\n    \"type\": \"state\",\n    \"account\": \"xrb_38j81fhhd4qn58k8sps5drn3ubqymcyx7jw5ixftg57kxdem5qbt4h3cnnng\",\n    \"previous\": \"78AEF801FA0C714531DB78301B78AD0E67718A38CCECE6DFAC2B64C4190C110A\",\n    \"representative\": \"xrb_1ywcdyz7djjdaqbextj4wh1db3wykze5ueh9wnmbgrcykg3t5k1se7zyjf95\",\n    \"balance\": \"150567889999999999999999998\",\n    \"link\": \"BC692F56B8B5CDA7B325E1DA47BE2D22477C7D1BE29CF31A271F66358437C5A2\",\n    \"link_as_account\": \"xrb_3h5b7xddjfgfnyskdrgtayz4tak9hjyjqrnwyef4g9u88p45hjf4zdibbm5o\",\n    \"signature\": \"A7DABA9DD30D5FB16633F74D84CB6B506BF9322FC5271CDC7EF29524CAA3CDB48D4F5C39DBFD7E16C96651CBEAC3848621CC16DC8C0FF6F7D43C737EF01D5101\",\n    \"work\": \"80000000008b56f6\"\n}\n", "is_send": "true", "amount": "10000000000000000000000000"}

This is the response I expect:

{"hash": "A3B74654AC5BEBCA1EAD3EDEDAC4EA73A907B30CF9724E20987F0ACD4C78BB55", "account": "xrb_38j81fhhd4qn58k8sps5drn3ubqymcyx7jw5ixftg57kxdem5qbt4h3cnnng", "block": { "type": "state", "account": "xrb_38j81fhhd4qn58k8sps5drn3ubqymcyx7jw5ixftg57kxdem5qbt4h3cnnng", "previous": "78AEF801FA0C714531DB78301B78AD0E67718A38CCECE6DFAC2B64C4190C110A", "representative": "xrb_1ywcdyz7djjdaqbextj4wh1db3wykze5ueh9wnmbgrcykg3t5k1se7zyjf95", "balance": "150567889999999999999999998", "link": "BC692F56B8B5CDA7B325E1DA47BE2D22477C7D1BE29CF31A271F66358437C5A2", "link_as_account": "xrb_3h5b7xddjfgfnyskdrgtayz4tak9hjyjqrnwyef4g9u88p45hjf4zdibbm5o", "signature": "A7DABA9DD30D5FB16633F74D84CB6B506BF9322FC5271CDC7EF29524CAA3CDB48D4F5C39DBFD7E16C96651CBEAC3848621CC16DC8C0FF6F7D43C737EF01D5101", "work": "80000000008b56f6"}, "is_send": "true", "amount": "10000000000000000000000000"}

@guilhermelawless
Copy link
Contributor

This will be easy after getting websockets in Nano node v19

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

2 participants