ErikReider / SwayNotificationCenter

A simple GTK based notification daemon for SwayWM
GNU General Public License v3.0
1.29k stars 62 forks source link

[Bug] JSON schema is not valid #298

Closed rhoriguchi closed 1 year ago

rhoriguchi commented 1 year ago

Describe the bug JSON schema is not in a valid format. check-jsonschema and jsonschema complain about the format.

To Reproduce Steps to reproduce the behavior:

  1. Validate schema with check-jsonschema --schemafile configSchema.json config.json

Expected behavior Schema should be valid.

Please provide logs if you're experiencing notification errors / bugs Attach Gists for swaync logs by running G_MESSAGES_DEBUG=all swaync and (if applicable) application logs.

> check-jsonschema --schemafile /nix/store/vxr9mrhjsb8rbv4rfqidk73dm28wx11z-SwayNotificationCenter-0.9.0/etc/xdg/swaync/configSchema.json /nix/store/vxr9mrhjsb8rbv4rfqidk73dm28wx11z-SwayNotificationCenter-0.9.0/etc/xdg/swaync/config.json
Error: schemafile could not be parsed as JSON
SchemaParseError: /nix/store/vxr9mrhjsb8rbv4rfqidk73dm28wx11z-SwayNotificationCenter-0.9.0/etc/xdg/swaync/configSchema.json
  in "/nix/store/3n3hsrm9l2163zbv2acnabp8k4yy5ih8-check-jsonschema-0.21.0/lib/python3.10/site-packages/check_jsonschema/checker.py", line 52
  >>> return self._schema_loader.get_validator(

  caused by

  FailedFileLoadError: Failed to parse /nix/store/vxr9mrhjsb8rbv4rfqidk73dm28wx11z-SwayNotificationCenter-0.9.0/etc/xdg/swaync/configSchema.json
    in "/nix/store/3n3hsrm9l2163zbv2acnabp8k4yy5ih8-check-jsonschema-0.21.0/lib/python3.10/site-packages/check_jsonschema/schema_loader/readers.py", line 18
    >>> schema = callback()

    caused by

    JSONDecodeError: Expecting property name enclosed in double quotes: line 288 column 9 (char 10689)
      in "/nix/store/3n3hsrm9l2163zbv2acnabp8k4yy5ih8-check-jsonschema-0.21.0/lib/python3.10/site-packages/check_jsonschema/parsers/__init__.py", line 89
      >>> return loadfunc(fp)