Skip to content

Parser can't handle single quotes (instead of double quotes) #160

Description

@jeremy-tafi
data := "{'value':'data'}"
str, err := jsonparser.GetString([]byte(data), "value")
if err != nil {
	fmt.Print(err)
} else {
  fmt.Print(str)
}

This example fails to find the key "value" because it is surrounded by single quotes instead of double quotes. Even though "technically", they should be double quotes, it'd be nice if the parser handled single quotes interchangeably.

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