title: JSON.parse & JSON.stringify handling long integers as strings
body: <p>I have the problem, that I need to parse long integers in my API. Since I don't do anything arithmetically, it is the easiest to handle them as Strings. I tried <a href="https://github.com/MikeMcl/bignumber.js/" rel="nofollow noreferrer">Bignumber.js</a>, but it starts complaining if numbers are longer than 15 characters. Unfortunately I have to handle them as well.</p>
  <p>Since I don't do anything arithmetically with it and actually even store those numbers as String I would like a JSON Parser that parses too big numbers as Strings and is capable of also treat them as numbers in JSON.stringify.</p>
  <p>I tried the stringify with a replacer function, but I could not get rid of the quotes around my number.</p>
  <p>I also did not find a library, that just takes care of this issue.</p>
  <h3>Edit / Clarification</h3>
  <p>I want my big number to be a String in javascript, but a number in JSON (after JSON.stringify)</p>
  <p>e.g. Object in Javascript</p>
  <pre><code>var myObj = {
      id: &quot;89074987798719283473&quot; // &lt;-- String within javascript
  }
  
  var objString = JSON.stringify(myObj)
  </code></pre>
  <p>Now my objString should be</p>
  <blockquote>
  <p>{id: 89074987798719283473}</p>
  </blockquote>
  <p>And NOT</p>
  <blockquote>
  <p>{id: &quot;89074987798719283473&quot;}</p>
  </blockquote>