title: How to store a javascript function in JSON
body: <p>I have a JS object I would like to save in Local Storage for future use, and I cannot parse it to a string.</p>
  
  <p>Code:</p>
  
  <pre><code>JSON.stringify({
      a: 5,
      b: function (param) {
          return param;
      }
  })
  </code></pre>
  
  <p>Result:</p>
  
  <pre><code>"{"a":5}"
  </code></pre>
  
  <p>How do I save it for future use, if not with JSON?</p>
  
  <p>(And creating my own Lexer-Parser to interupt string function I dont think is an option)</p>