Skip to content

Invalid UTF-8 chars prevent formatting #5

Description

@lucacasonato

Describe the bug

deno fmt fails to format a JSON file because it contains invalid UTF8 chars.

dprint-plugin-json version: 0.10.2

Input Code

See https://gist.github.com/lucacasonato/a060df497ca3156327bcef46a554a8fb

Expected Output

A nicely formatted file, like prettier is able to generate.

Actual Output

Error formatting: /home/lucacasonato/Downloads/report.json
   Line 1, column 785340: Invalid unicode escape sequence. 'd834' is not a valid UTF8 character

  to ArrayBuffer with \ud834A\udf06A¥
                      ~~~~~~

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions