Convenience method for obtaining well-formed JSON text from the key