Fixed the broken JSON encoder

Because, well, it was broke.

Passing any " ' " would invalidate the JSON.