sacrifice. Lightweight JSON library written in vanilla JavaScript
All you need is sacrifice.js. No complex build systems. Just ~5kB. Nothing else.
<script src="sacrifice.js"></script>
sacrifice.validate("[42]"); // true
sacrifice.validate("[ 42 ] s"); // false
sacrifice.trim("[42, [ 42 ]]"); // "[42,[42]]"
sacrifice.stringify([42, {"key": 42}]); // "[42, {"key": 42}]"
sacrifice.stringify([42, function(){}]); // undefined ( see: sacrifice.errorMsg )
sacrifice.parse("42"); // "42"
sacrifice.parse("4 2"); // undefined ( see: sacrifice.errorMsg )