Skip to content

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

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();

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