Package detail

jsonify

ljharb29.7mPublic Domain0.0.1

JSON without touching any globals

json, browser

readme

jsonify Version Badge

github actions coverage License Downloads

npm badge

This module provides Douglas Crockford's JSON implementation without modifying any globals.

stringify and parse are merely exported without respect to whether or not a global JSON object exists.

build status

methods

var json = require('jsonify');

json.parse(source, reviver)

Return a new javascript object from a parse of the source string.

If a reviver function is specified, walk the structure passing each name/value pair to reviver.call(parent, key, value) to transform the value before parsing it.

json.stringify(value, replacer, space)

Return a string representation for value.

If replacer is specified, walk the structure passing each name/value pair to replacer.call(parent, key, value) to transform the value before stringifying it.

If space is a number, indent the result by that many spaces. If space is a string, use space as the indentation.

install

With npm do:

npm install jsonify

To use this module in the browser, check out browserify.

license

public domain

changelog

Changelog

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog and this project adheres to Semantic Versioning.

v0.0.1 - 2022-10-11

Commits

  • [eslint] fix indentation 1c92797
  • [eslint] add eslint 6a05332
  • [readme] rename, add badges, soft-wrap cb1bd1a
  • [actions] add reusable workflows 49710ae
  • [eslint] use function decls, but avoid relying on hoisting dcba2f4
  • [Tests] switch to tape d31aaa0
  • [meta] add auto-changelog 474188e
  • using travis 7064ab5
  • [Refactor] parse: move fn comments outside of the fn body 78f111a
  • [meta] create FUNDING.yml; add funding in package.json 98db8e1
  • [meta] use npmignore to autogenerate an npmignore file 1732b45
  • [meta] update URLs 26ded36
  • install notes 57daaee
  • Only apps should have lockfiles 1f25819
  • [meta] add safe-publish-latest 8f3ef5e
  • [Tests] add aud in posttest 4c64711
  • Update tap. 8cf38a6
  • fix broken browserify link 9dc7744

v0.0.0 - 2011-08-21

Commits

  • first commit 11c7bdf
  • the recursive descent parser is the fastest, going with it 9210504
  • took out unnecessary functions from json.js, only stringify-related stuff remain 99a8b65
  • fix parse by removing another callback of indirection 10e1b96
  • Hygiene 633fe5a
  • a package.json 5258ce2
  • pared down parse.js 40d8617
  • Style conformance. ad6079c
  • forgot the readme and index.js 69d3062
  • stringify test using garbage passes 29db45f
  • parse test passes too hooray d58c20e
  • Create a JSON object only if one does not already exist. 8d11dc6
  • !isFinite 8e0b15c
  • move into lib 006d2aa