Canonical JSON implementation - a repeatable version of JSON.stringify