From a6c34f57cf59b6f84bb70aed4d92816d162bc6a9 Mon Sep 17 00:00:00 2001
From: Landon Curt Noll jparse(1) tool may be installed from
repo
contains information about how to find and compile the mkiocccentry
toolkit, which includes the IOCCC version of the jparse(1) tool, located
-under the mkiocccentry directory as jparse/jparse. Additionally you
-may use the make install command to install the mkiocccentry toolkit,
-including jparse into the default location of /usr/local/bin/jparse.
mkiocccentry directory as jparse/jparse.
+Additionally you may install the jparse(1) tool from the jparse
+repo:
git clone https://github.com/xexyl/jparse.git
+ cd jparse
+ make clobber all test
+ sudo make install
The syntax of jparse(1) is very simple:
jparse foo.json
If the tool shows valid JSON then the document is valid JSON; otherwise it’ll
@@ -1632,12 +1636,10 @@ the tool.
If you want to validate the .auth.json or .info.json files you
should use chkentry(1) from the mkiocccentry
repo.
chkentry uses the jparse
-API; you can use the jparse tool itself to validate JSON documents, discussed
-above in the
-FAQ on “validating JSON documents”
-but the chkentry tool has additional checks on these two IOCCC specific files.
-See the
+
The chkentry(1) tool uses the
+jparse API
+API to perform additional checks on these two IOCCC specific JSON files.
See the FAQ on “.auth.json” and FAQ on “.info.json” @@ -1658,7 +1660,7 @@ If you pass a single argument, it is expected to be a directory that has both # run checks on .info.json and .auth.json: chkentry .info.json .auth.json
If there is a JSON issue detected by
-jparse(3), then there is a JSON error and
+jparse(3) API, then there is a JSON error and
chkentry(1) will report it as an error. If the parsing is OK (i.e. valid
JSON) but there is an issue in one or both of the
JSON files in the context of the IOCCC,
@@ -3190,9 +3192,9 @@ provided by the author and any other file in the winning entry, found under the
entry’s subdirectory.
If you downloaded 1984/mullender/1984_mullender.tar.bz2, for instance, you might
then do:
cd 1984/mullender
- make everything
- ./mullender.alt cd 1984/mullender
+ make everything
+ ./mullender.altto compile all versions and then run the alternate version (if you have
a PDP-11 or VAX-11 you would be able to run the original version). For more help
on compiling entries, see also the
@@ -3233,8 +3235,8 @@ if you switched to each entry’s directory and ran make everything
If you download the 1984 tarball, i.e. 1984/1984.tar.bz2, then you might
extract it and then switch to the directory and compile everything of each
entry:
cd 1984
- make everything cd 1984
+ make everythingFor more help on compiling entries, see also the FAQ on “IOCCC Makefile rules”.
Of course in this case you can also switch to individual entries and look at the
@@ -4245,6 +4247,9 @@ if you wish to validate every JSON file in author/ then you could d
for auth in *.json; do jparse -q "$auth" || echo "$auth is invalid JSON" ; done
If you see any output then it will say which file or files are invalid JSON (this should not actually happen, however).
+See the
+FAQ on “jparse”,
+for now to location and/or install the jparse(1) command.