Skip to content

-j formats single quote instead of double #2

Description

@LighghtEeloo

For example:

{
    'nodes': [
        {
            'id': 0,
            'size': 1,
            'color': 'rgba(189,8,242,0.7)',
            'label': '/home/lighght/Yggdrasill/Hof/v8_clion/src/wasm/compilation-environment.h',
            'group': 'src/wasm',
            'x': 0.00318283616270964,
            'y': 0.002160306621951876
        }
    ]
}

The problem of this format is that it doesn't yield proper json outcome, i.e. it can't be parsed by python json.load().

An easy fix is to use json.dump() to write it.

python version: 3.9

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