Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8880663
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T20:12:18+00:00 2026-06-14T20:12:18+00:00

just upgrading my application to SignalR alpha. They have changed the IJsonSerializer interface with

  • 0

just upgrading my application to SignalR alpha. They have changed the IJsonSerializer interface

with the previous interface I had:

   public string Stringify(object obj)
    {
        var s = "";

            s = JsonConvert.SerializeObject(obj, _settings);

        return s;

    }

and it worked fine.

Now I am trying:

public class CustomJsonNetSerializer : IJsonSerializer
{
    private readonly JsonSerializerSettings _settings;

    public CustomJsonNetSerializer(JsonSerializerSettings settings)
    {
        _settings = settings;
    }

    public object Parse(string json)
    {
        return JsonConvert.DeserializeObject(json);
    }

    public object Parse(string json, Type targetType)
    {
        return JsonConvert.DeserializeObject(json, targetType);
    }

    public T Parse<T>(string json)
    {
        return JsonConvert.DeserializeObject<T>(json);
    }
    public void Serialize(object value, System.IO.TextWriter writer)
    {
        var s = "";

            s = JsonConvert.SerializeObject(value, _settings);

        writer.Write(s);

    }
}

but now no messages are getting sent back to the clients.

Edited following David’s answer below – this is how I have implemented it – works now with the sample
The below code is of course pointless as it does what the default serialiser does – however I have removed my additions to do with locking objects for simplicity

public class CustomJsonNetSerializer : IJsonSerializer
{

    JsonNetSerializer mySerialiser;
    public CustomJsonNetSerializer(JsonSerializerSettings settings)
    {         
        mySerialiser = new JsonNetSerializer(settings);
    }



    public void Serialize(object value, System.IO.TextWriter writer)
    {
            mySerialiser.Serialize(value, writer);                   
    }

    public object Parse(string json, Type targetType)
    {
        return mySerializer.Parse(json, targetType);
    }
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T20:12:18+00:00Added an answer on June 14, 2026 at 8:12 pm

    The easiest way to do this is to use the built in serializer (JsonNetSerializer). Also changing the case of the properties being serialized will break SignalR. We’re working on that.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I just started working on upgrading a small component in a distributed java application.
I have recently been tasked with upgrading an application from .net 1.1 to 3.5
I just finished upgrading to Xcode 4.4 because the previous version of Xcode would
Recently I have been working on upgrading a big web application that was using
I was just tasked with upgrading an internal enterprise web application. The user enters
I'm just in the middle of upgrading a large application from Rails 3 to
I'm just upgrading from Spring 3.0.6 to 3.1 and there seems to be an
I'm just upgrading to Struts 2.3.1.2, and having a few issues with JUnit tests.
We are just upgrading our ASP.Net shop implementation (from simple one) to structure that
Not so much a question as an observation... I'm just upgrading to SQL Server

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.