{ "api_host":"The hostname of your API server. You may also specify the port.", "api_host":"hodorhodor.com", "retry_interval":"The interval in seconds between retrying failed API calls", "retry_interval":10, "auth_token":"The authentication token. It is available in your developer dashboard under 'Settings'", "auth_token":"5ad0eb93697215bc0d48a7b69aa6fb8b", "favorite_numbers":"An array containing my all-time favorite numbers", "favorite_numbers":[19,13,53] }
支持注释的解析器
虽然标准不支持,但部分解析器支持添加注释:
JsonCpp:支持C++风格的注释。示例如下:
1 2 3 4 5 6 7 8 9 10 11 12 13
// Configuration options { // Default encoding for text "encoding":"UTF-8", // Plug-ins loaded at start-up "plug-ins":[ "python", "c++", "ruby" ], // Tab indent size "indent":{"length":3,"use_space":true} }
JSON5:是JSON的超集,支持C++风格的注释。示例如下:
1 2 3 4 5 6
// A single line comment. /* A multi- line comment. */ { "key":"value" }