Skip to content

Neo4j Browser 'Export JSON' function does not escape backslash #1826

Open
@markslater

Description

@markslater

When exporting data as JSON from the Neo4j Browser UI, backslashes in the data are not escaped, resulting in invalid JSON.

  • Neo4j version: 4.4.10 Enterprise
  • Operating system: N/A (reproduced in public sandbox)
  • API/Driver: N/A

Steps to reproduce

Create a node with a property that contains a backslash:

CREATE ({name:"AC\\DC"})

Retrieve the property:

MATCH (n) RETURN n.name AS name

Note that in the UI, the name is shown correctly: "AC\DC"

Click on 'Export JSON'

The exported JSON is invalid because the backslash isn't escaped:

[
  {
    "name": "AC\DC"
  }
]

Expected behavior

The exported JSON should escape the backslash:

[
  {
    "name": "AC\\DC"
  }
]

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions