Skip to content

JSON.stringify() wraps the output within ` (Grave Accent mark) #294

@ASHIQUEMD

Description

@ASHIQUEMD

Issue: if the object contains string data with single quoted value in it, e.g. "Test 'data'", JSON.stringify(results) returns result wrapped in ` (Grave Accent mark).

Actual result:

image

Expected result (without ` ): {"analyzer":"Test 'data'","details":{"range":{"start":"1","end":"2"},"description":"Hello"}}

Sample code:

function main() {
    const results = {
        analyzer: "Test 'data'",
        details: {
            range: {
                start: "1",
                end: "2"
            },
            description: "Hello"
        }
      };

    return JSON.stringify(results);
  }
  
 main();

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