Skip to content

Json property name with special characters produce inconsistent results with json -> 'propertyname' and json_extract #13948

@markgraphene

Description

@markgraphene

What happens?

different results when referring to json properties (ie. json -> 'property' and json_extract), particularly if special characters in property name.
ie.

To Reproduce

SELECT '{"Status / SubStatus": "test"}' -> 'Status / SubStatus';  -- null
SELECT '{"Status / SubStatus": "test"}' -> '"Status / SubStatus"';  -- null
SELECT '{"Status / SubStatus": "test"}' -> '$."Status / SubStatus"';  -- test

same for json_extract

OS:

Windows

DuckDB Version:

1.0.0

DuckDB Client:

Datagrip, CLI

Hardware:

No response

Full Name:

Mark Alford

Affiliation:

Graphene

What is the latest build you tested with? If possible, we recommend testing with the latest nightly build.

I have tested with a stable release

Did you include all relevant data sets for reproducing the issue?

Yes

Did you include all code required to reproduce the issue?

  • Yes, I have

Did you include all relevant configuration (e.g., CPU architecture, Python version, Linux distribution) to reproduce the issue?

  • Yes, I have

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions