validate json from stdin