While building [lofo](https://www.npmjs.com/package/lofo), as a step during the program's execution, I wanted to write an `object` literal to a file. The obvious solution was to `JSON.stringify()` the object first, then write it to the file but, the result of that approach was this [issue](https://github.com/binlf/lofo/issues/2), where **Next.js** would fail with an error: _`Unexpected object key type`_, when trying to read the "stringified" object. I concluded that the solution was to "deserialize" the object key first, then write to the file. It worked!
0 commit comments