JSPM

stringtojsonck

1.0.1
    • ESM via JSPM
    • ES Module Entrypoint
    • Export Map
    • Keywords
    • License
    • Repository URL
    • TypeScript Types
    • README
    • Created
    • Published
    • Downloads 3
    • Score
      100M100P100Q9547F
    • License ISC

    string to json converter

    Package Exports

    • stringtojsonck
    • stringtojsonck/index.js

    This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (stringtojsonck) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

    Readme

    Safe JSON Parser

    A robust JSON parser that automatically fixes common errors in malformed JSON.

    Installation

    npm install stringtojsonck
    
    usage
    
    const stringToJsonCk = require("stringtojsonck");
    
    const brokenJSON = `{
      type: "service_account",
      project_id: "someID",
      private_key: "-----BEGIN PRIVATE KEY-----\\nMIIEvAIB...END PRIVATE KEY-----\\n"
    }`;
    
    const parsed = stringToJsonCk(brokenJSON);
    console.log(parsed);