{"size": 600, "ext": "js", "max_stars_repo_path": "docs/1.js/JSON.stringify.js", "max_stars_repo_name": "lulongwen/js", "max_stars_repo_stars_event_min_datetime": "2020-03-19T13:04:01.000Z", "max_stars_repo_stars_event_max_datetime": "2020-04-30T00:56:24.000Z", "max_issues_repo_path": "docs/1.js/JSON.stringify.js", "max_issues_repo_name": "lulongwen/js", "max_issues_repo_issues_event_min_datetime": "2020-02-05T11:59:40.000Z", "max_issues_repo_issues_event_max_datetime": "2020-02-05T11:59:40.000Z", "max_forks_repo_path": "docs/1.js/JSON.stringify.js", "max_forks_repo_name": "lulongwen/js", "max_forks_repo_forks_event_min_datetime": "2019-06-24T00:47:31.000Z", "max_forks_repo_forks_event_max_datetime": "2019-06-24T00:47:31.000Z"}
{"max_stars_count": 2, "max_issues_count": 3, "max_forks_count": 1, "avg_line_length": 15.3846153846, "max_line_length": 98, "alphanum_fraction": 0.6533333333}
/*
	html
		<pre id="pre"></pre>

	const str = JSON.stringify(list, null, 2)
	pre.innerHTML = str
*/
const person = {
  sex: 'man',
  name: 'Tom',
  phone: [ 123, 456 ]
}


// 直接显示字符串
JOSN.stringify(person)


// 将一个json对象格式化显示出来，配合pre标签
JOSN.stringify(person, null, 2)


// 不显示某些字段，哪些字段不需要显示就返回undefined
// {sex: 'main', name: 'Tom'}
JOSN.stringify(person, function(k, v){
  if (k === 'phone') return undefined
  return v
}, 2)



// 只显示某些字段 {sex: 'main'}
JOSN.stringify(person, ['sex'], 2)



// 参考资料
// https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify
