Git Product home page Git Product logo

Comments (4)

artempyanykh avatar artempyanykh commented on June 9, 2024 1

Oh, missed the notification! Thanks for the update @theramis! Yeah, I solved my problems with serialization.

from snapper.

theramis avatar theramis commented on June 9, 2024

Hey @artempyanykh,

Thanks for your request. I haven't personally used F# much but your request does look quite similar to some of the other request regarding customising how Snapper serialises the snapshots.
I'll have a think about how best to allow for this customisation.

Do you happen to have an example of what a snapshot looks like currently when this is used in F#?

from snapper.

artempyanykh avatar artempyanykh commented on June 9, 2024

@theramis sure,
Here's the string repr:

Bind (false, "x2", Lit (Int 42), Var "x2")

And here's the JSON one:

{
    "Case": "Bind",
    "Fields": [
      false,
      "x2",
      {
        "Case": "Lit",
        "Fields": [
          {
            "Case": "Int",
            "Fields": [
              42
            ]
          }
        ]
      },
      {
        "Case": "Var",
        "Fields": [
          "x2"
        ]
      }
  ]
}

The original type definition can be found here: https://github.com/artempyanykh/Fang/blob/main/Core/Lang.fs
Usage of sharpshooter is here: https://github.com/artempyanykh/Fang/blob/main/Tests/ParserTests.fs

from snapper.

theramis avatar theramis commented on June 9, 2024

Hey @artempyanykh,

do you think you could solve you issue by using this?
https://theramis.github.io/Snapper/#/pages/snapper/custom_snapshot_settings

You could implement a custom converter to convert objects like these to a nicer json format?

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.