GithubHelp home page GithubHelp logo

jsonist's People

Contributors

brandondoran avatar mortimerp9 avatar ralphtheninja avatar rvagg avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

jsonist's Issues

Breaking change made in a patch version

The latest update from 2.1.0 to 2.1.1 has changed usages of 'var' to 'let', which is a breaking change for anyone using node versions < 6. This package is not a direct dependency of ours and therefore we do not control the version. Our version of node cannot be upgraded for legacy reasons, and we are now unable to redeploy our server.

Could you please publish a new patch version which reverts to 'var', and republish your latest version as either a minor or major version.

Non-JSON 404s throw Syntax errors

If an endpoint is expecting JSON but hits, say, a 404 returning text/plain, the JSON is still attempted to be parsed and a Syntax Error is returned as the err to the callback. But you may want to handle that differently to an actual syntax error. I suggest the response code & mime-type should be checked before the body is parsed, and maybe return a jsonist.NOT_JSON_ERROR instead of a SyntaxError so we can differentiate the classes of failure.

Current output for a http server sending back text/plain as "Not Found":
image

Delete method

Hi Rod. I would find the addition of delete method useful. Is this something you would consider merging into jsonist? I will submit a PR if so. Thanks.

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.