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.

NotImplementedException when serializing SearchMovie object

See original GitHub issue

Hi there.

I am receiving a NotImplementedException when trying to (Json) serialize a SearchMovie object. I’ve noticed the problem comes from method WriteJson (SearchBaseConverter.cs) Is there any reason to leave it this way? Couldn’t you just override ReadJson and leave the WriteJson part to the base JsonConverter?

public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer) { throw new NotImplementedException(); }

Thanks in advance.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
LordMikecommented, Dec 23, 2016

Great 😃

Merry Christmas.

Sent from my iPhone

On 22 Dec 2016, at 08.07, Bukran notifications@github.com wrote:

It did, indeed @LordMike. Thanks. I didn’t noticed 1.0.1-alpha was already up and was just waiting for the next major update. I have already tried SearchMovie and Movie classes and they both serialize ok.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

1reaction
LordMikecommented, Dec 19, 2016

I kinda should’ve expected somebody to want to serialize stuff again. I’ll look into creating writers for the various converters.

As for just relaying them to base, I think it might not work - not always at least. The converters should be transitive, meaning that serializing A to B should allow you to deserialize B back to A.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Serialize property that throws NotImplementedException
A possible workaround would be to create another object from EasyToSerialize and then serialize it. [Serializable] public class EasyToSerialize ...
Read more >
SerializeObject NotImplementedException .Net Core #999
When trying to serialize an object a NotImplementedException occurs. ... An unhandled exception occurred while processing the request.
Read more >
NotImplementedException Class (System)
Occurs when an exception is serialized to create an exception state object that contains serialized data about the exception. (Inherited from Exception) ...
Read more >
Error getting value from 'DefaultValue' on 'NHibernate.Type ...
I am trying to send an entity that has been saved to the database using using NHibernate across a SignalR hub connection. When...
Read more >
Why is having a NotImplementedException a good thing?
A mock can need to implement only a small part of an interface, but to compile, it should declare all of them. The...
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