-
Recently Browsing 0 members
- No registered users viewing this page.
-
Similar Content
-
Akka Serverless to offer secure and flexible solutions for building cloud-native services
By Fiza Ali,
- lightbend
- akka serverless
- (and 11 more)
- 0 replies
- 3 views
-
Get this Complete JavaScript & jQuery Programming Bundle for only $26
By News Staff,
- javascript
- jquery
- (and 12 more)
- 2 replies
- 593 views
-
- 1 answer
- 1,161 views
-
- 2 answers
- 1,916 views
-
- 12 answers
- 10,020 views
-
Question
sathenzar
The problem I have is so simple, yet it has had me banging my head against my keys over and over again. I have a WCF service; I want to be able to stream json data. Simple right? Well if I have over 100,000 json objects that need to be streamed to the WCF service, trying to deserialize that is not good, and DataContractJsonSerializer throws an OutOfMemoryException. Will I ever need to send that much data? Probably not, but it's the idea of wanting to know how in case I ever would want to. So ok, so lets just write the list to a memory stream and then read each element individually as its streamed. Again, simple right? Nope. Been playing with so many different examples, none of which have worked. All I want to do is:
And have that serializer write: [{product_name: 'Test', RowState : 'Added'}, {RowState: 'Added'}]
But it can't, for it to work, it wants me to pass in the whole list at once of objects, running into my previous problem. Today Google is not my friend, as every example about these classes does NOT have want I want to do in them at all. I'd appreciate any help.
Link to comment
Share on other sites
6 answers to this question
Recommended Posts