GithubHelp home page GithubHelp logo

Comments (4)

theramis avatar theramis commented on May 27, 2024 1

Hey @viceice ,

Sorry for the late reply, you're on a role with all these bugs that you keep finding!
In this case the bug is happening because you are setting the default settings for newtonsoft and it broke in the one place I missed overriding the settings.
https://github.com/theramis/Snapper/blob/2.2.2/project/Snapper/Json/JsonSnapshotStore.cs#L39

The fix is simple, I just need to use the JObjectHelper class in the solution and then the generated snapshot looks like this

{
  "Boundary": null,
  "CharSet": null,
  "MediaType": "text/html",
  "Name": null,
  "Parameters": []
}

I'll make a PR with the change and release it soon.

Thanks again for the bug report!

from snapper.

viceice avatar viceice commented on May 27, 2024 1

I've started using this lib more and more on a big project. 😅

from snapper.

theramis avatar theramis commented on May 27, 2024 1

I've started using this lib more and more on a big project. 😅

Ahh, I see!

Anyways the change is going out in v2.2.3.

Should be up in nuget in the next 10/15 mins 😄

from snapper.

viceice avatar viceice commented on May 27, 2024

Workaround: Convert to JObject before passing to Assert.

object ToJson(object obj) {
  var res = JToken.FromObject(obj);
  return res is JObject ? res : new JObject { { "autoGenerated", res } };
}

from snapper.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.