Skip to content

Provide an option to disable JSON parsing #1072

Closed
@bunchjesse

Description

@bunchjesse

In both binary_parser.js and text_parser.js we're parsing the JSON string to a native object:

case Types.JSON:
  // Since for JSON columns mysql always returns charset 63 (BINARY),
  // we have to handle it according to JSON specs and use "utf8",
  // see https://github.com/sidorares/node-mysql2/issues/409
  return 'JSON.parse(packet.readLengthCodedString("utf8"))';

Similarly to the configuration option dateStrings, it would be nice to provide something like jsonStrings which would avoid this and just return the utf8 string.

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