Lurker News
I'm thinking of tiny projects along the lines of single-function tools like domainr. But also game-changing ebooks, newsletters, courses.

Comments (868) 410 threads

Show all comments

Showing thread 57 of 410

ThomasRooney1 reply#
I built https://fancyjson.com in a day about 5 months ago. I've used it pretty often since. Its a fancy JSON beautifier.

It tries to compact simple objects and spaces all delimiters. It also attempts to align array children. The idea was to produce the most compact, yet still easily readable form of a JSON document.
I was creeped out when trying to find something like this online, because there are many which send your JSON document to the backend instead of doing it on the client.

dflock1 reply#
Neat! just tried it with this json and it didn't do a great job:

  {
    "name": "vuejs-guide-test-1",
    "version": "0.0.1",
    "description": "My app",
    "author": "Duncan Lock ",
    "private": true,
    "dependencies": {
      "vue": "^2.0.5"
    },
    "devDependencies": {
      "babel-core": "^6.1.2",
      "babel-loader": "^6.1.0",
      "babel-plugin-transform-runtime": "^6.1.2",
      "babel-preset-es2015": "^6.1.2",
      "babel-preset-stage-0": "^6.1.2",
      "babel-runtime": "^6.0.0",
      "webpack": "^1.12.2",
      "webpack-dev-server": "^1.16.2"
    }
  }

this was the result:

  {
  "name": "vuejs-guide-test-1",
   "version": "0.0.1",
   "description": "My app",
   "author": "Duncan Lock ",
   "private": true,
   "dependencies": { "vue": "^2.0.5" },
   "devDependencies":
   {
   "babel-core": "^6.1.2",
     "babel-loader": "^6.1.0",
     "babel-plugin-transform-runtime": "^6.1.2",
     "babel-preset-es2015": "^6.1.2",
     "babel-preset-stage-0": "^6.1.2",
     "babel-runtime": "^6.0.0",
     "webpack": "^1.12.2",
     "webpack-dev-server": "^1.16.2"
   }
  }
dotancohen#
That's the same XSS vulnerability that I came to report. Here is a simplified test case:

    {"name":"HELLO"}