kounoike / Chinachu

An Open Source Digital Video Recorder System for Linux.
https://chinachu.moe/
Other
0 stars 1 forks source link

config.jsonのvalidatorが欲しい #7

Closed kounoike closed 9 years ago

kounoike commented 9 years ago

http://spacetelescope.github.io/understanding-json-schema/reference/index.html こういうのをがりがりと書いて、config.jsonが間違ってないかチェックできると良いかな。

kounoike commented 9 years ago

https://github.com/epoberezkin/ajv こういうのでチェックできてエラーメッセージも出るみたいだ。 でも、キーのtypoとかには対応していないのかな、どうだろう。

kounoike commented 9 years ago

Ajvがいい感じ。「余計なフィールドがあるよん」とか教えてくれるみたいだ。 JSONのシンタックスレベルの問題には、json-parse-helpfulerrorが良さそう。

kounoike commented 9 years ago

作ってPR出した。