Package

purescript-json-minify

Repository
dgendill/purescript-json-minify
License
MIT
Uploaded by
dgendill

Latest release Build Status

This module is a foreign interface to the JSON.minify function written by Kyle Simpson. It's only purpose is to remove comments and whitespace from JSON data.

The original javascript source can be found here.

Module JSON.Minify

minify

minify :: String -> String

Accepts a JSON string and returns a new string with comments and whitespace removed.

Install

bower install purescript-json-minify

Example

import JSON.Minify (minify)

-- returns "{\"a\":\"a\"}"
minified = (minify "// comment \n {\"a\":\"a\"}")")

Tests

To run the tests install the package locally.

git clone https://github.com/dgendill/purescript-json-minify
bower install
npm run test

Compatibility

Purescript purescript-json-minify
v0.10.2 v2.x.x
v0.10.1 v2.x.x
v0.9.3 v1.x.x
v0.9.2 v1.x.x

You can use psvm to switch between purescript versions.

Modules
JSON.Minify
Dependencies
No dependencies