Coder Social home page Coder Social logo

Comments (5)

rileyjshaw avatar rileyjshaw commented on June 26, 2024 3

The main use case for this package is to create the same string from the deep-equal objects to be used as a key - in this case the space option is NOT needed (and it only impacts performance).

If the object is stringified for the presentation the normal JSON can be used, can't it?

@epoberezkin I’m not sure how representative this is, but my use case also requires space. I dynamically create a large object from scraped content, and check it into source control. Diffs are huge if the saved JSON is a single line. They are usually a single line with a stable property order… but I need to pass in space for that to work.

from fast-json-stable-stringify.

i-am-the-slime avatar i-am-the-slime commented on June 26, 2024 3

Same here, I stable stringify to see diffs in my tests. I don't want to look at one line JSON files.

from fast-json-stable-stringify.

epoberezkin avatar epoberezkin commented on June 26, 2024

The main use case for this package is to create the same string from the deep-equal objects to be used as a key - in this case the space option is NOT needed (and it only impacts performance).

If the object is stringified for the presentation the normal JSON can be used, can't it?

from fast-json-stable-stringify.

wtgtybhertgeghgtwtg avatar wtgtybhertgeghgtwtg commented on June 26, 2024

This was mostly raised for webpack use, but they decided to go in another direction. Sorry for the bother.

from fast-json-stable-stringify.

retorquere avatar retorquere commented on June 26, 2024

I'd still be interested in this. It is correct that I want stable JSON for (test comparisons), but I also need them to be human-readable.

from fast-json-stable-stringify.

Related Issues (9)

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.