Fix syntax errors in JSON doc samples

Some doc samples weren't valid JSON files. This commit fixes syntax
errors in those files and adds a unit test that will validate JSON files.

Change-Id: Ibaf1423303e2d278cc213d180801d597164601a3