Skip to content

Callback response formatting #2

Description

@shamo42

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"}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions