question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Feature Request] Original Json

See original GitHub issue

In some scenarios, I’d need to store the result of the update streams as is, and to do that, I am serializing the object that Binance.Net has just deserialized. Example:

var stream= await _binanceSocketClient.Spot.SubscribeToTradeUpdatesAsync(symbol, async data =>
{
    var json = JsonSerializer.Serialize(data);
    await _redis.GetDatabase().PublishAsync("tradeStream", json);
});

running the app against a profiler shows a lot of time and memory are being utilized with .Serialize(). Is it possible to add a property/method to retrieve the original Json text? Something like data.Text

So far, the areas I am concerned about is Spot.SubscribeTo.. and Spot.SubscribeToUserDataUpdatesAsync().

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
JKorfcommented, May 26, 2021

Hi, in the latest beta releases I’ve added an option for this. If you enable OutputOriginalData in the client options, the WebCallResult and DataEvent (new wrapper for socket updates) objects will contain the originally received json in the OriginalData property.

1reaction
ehajricommented, May 18, 2021

@HypsyNZ thank you for the workaround.

Indeed the file is growing so fast, and it doesn’t seem I can assign logwriter for each sub.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Feature Request: Encode Forms Data as JSON
To do this, we use Workflow to first encode the data of the original process as JSON, then we stick it into a...
Read more >
Json-lib / Feature Requests
#. Sort A ‑> Z; Sort Z ‑> A Summary▾. Sort A ‑> Z; Sort Z ‑> A Milestone▾. Sort... 88 JSON‑>Java serialization support...
Read more >
[feature request] copy JSON response
I'd like to request a new feature: the ability to copy the JSON object response from a GET request for pasting into another...
Read more >
FEATURE REQUEST: JSON Viewer & Editor
Dear Adobe DreamWeaver Team, as a new feature I would very much appreciate a JSON Viewer & Editor. Currently my workaround is quite...
Read more >
Easily enforcing valid JSON schema following - API
Hi,. I was very excited to see the new function calling feature, then quickly disappointed to see that it doesn't guarantee valid JSON....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found