How to use the cson.parseJSONString function in cson

To help you get started, we’ve selected a few cson examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github madskristensen / WebEssentials2013 / EditorExtensions / Resources / server / services / srv-cson.js View on Github external
var processJSON2CSON = function (data, sourceFileName, targetFileName, writer) {
    data = CSON.parseJSONString(data);

    if (typeof data === 'Error') {
        var err = "CSON: Invalid JSON content found";

        writer.write(JSON.stringify({
            Success: false,
            SourceFileName: sourceFileName,
            TargetFileName: targetFileName,
            Remarks: err,
            Details: err,
            Errors: [{
                Message: err,
                FileName: sourceFileName
            }]
        }));
        writer.end();

cson

CoffeeScript-Object-Notation Parser. Same as JSON but for CoffeeScript objects.

Artistic-2.0
Latest version published 4 months ago

Package Health Score

73 / 100
Full package analysis