add custom gist#toJSON
fixed toJSON bug