geolexica / isotc211.geolexica.org

ISO/TC 211 online version of the Multi-Lingual Glossary of Terms
https://isotc211.geolexica.org
4 stars 2 forks source link

Build failure due to post-processing JSON #131

Closed ronaldtse closed 4 years ago

ronaldtse commented 4 years ago

I ran into this issue with the current build. @skalee is post processing JSON a new process?

$ make clean all
...
      Generating... 
         Geolexica: Loading concepts
         Geolexica: Generating concept pages
         Geolexica: Generating meta pages
       Jekyll Feed: Generating feed for posts
cp: node_modules/@babel/polyfill/dist/polyfill.min.js: No such file or directory
                    done in 59.227 seconds.
 Auto-regeneration: disabled. Use --watch to enable.
echo "Postprocessing JSONs..."; \
    for f in _site/api/concepts/*.jsonld; do \
        mv ${f} .tmp.json; \
        json_pp -json_opt pretty,relaxed,utf8 < .tmp.json > ${f} && rm .tmp.json || mv .tmp.json ${f}; \
    done
Postprocessing JSONs...
, or } expected while parsing object/hash, at character offset 5930 (before "measurement accuracy...") at /usr/local/bin/json_pp line 59.
skalee commented 4 years ago

Postprocessing with json_pp is my solution to sanitize malformed JSONs. In some cases it is not capable to do so. However, these errors do not cause a build failure (exit status is 0). They are printed to console though.