Skip to content

wavedrompy fails to work on files generated by wavedrom #37

Description

@Araneidae

I'm not sure if this is a duplicate issue (certainly issue #34 seems to cover the same ground, but doesn't actually state the issue).

If I run wavedrompy -i test-file.json -s test-file.svg on a file generated using the wavedrom editor I get the following error message:

json.decoder.JSONDecodeError: Expecting property name enclosed in double quotes: line 1 column 2 (char 1)

I understand that the underlying issue is that the wavedrom file format (an example is shown below):

{signal: [
  {name: 'e', wave: '0.30.30..', data: ['τ', 'τ+1']},
  {name: 'x', wave: 'x.=x.=x..', data: ['x₀', 'x₁']},
  {name: 'δₑx', wave: 'x..=..=..', data: ['x₀', 'x₁']},
  {name: 'δe', wave: '0..30.30.', data: ['τ', 'τ+1']},
]}

is in what is referred to as "relaxed JSON", or really Javascript, which is a dialect the Python JSON decoder doesn't appear to understand.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions