Skip to content

Render valid JSON with an option #7

@mohsen1

Description

@mohsen1

When valid attribute is present, render a valid JSON that can be copied

  • remove constructor names from DOM tree and put them in :after elements so it doesn't copy
  • remove functions and values that are not valid in JSON. undefined, NaN, Infinity, (will be null)
  • add {, }, [, ], , where it's necessary to make JSON valid
  • write test that test produced HTML has valid JSON in it's innerText

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions