Enable line number display for JSON errors and improve error messages. See #317 and #325.