Skip to content

Add support for JSON_OBJECTAGG keyword in TSql170Parser #175

@naveennaik1

Description

@naveennaik1

We have encountered a parsing issue in Microsoft Documentation in JSON_OBJECTAGG using TSql170Parser 170.128.0.

Example script

SELECT JSON_OBJECTAGG( t.c1 : t.c2 )
FROM (
    VALUES('key1', 'c'), ('key2', 'b'), ('key3','a')
) AS t(c1, c2);

Steps to reproduce

        static void Main(string[] args)
        {
            var script = @"<EXAMPLE_SCRIPT>";

            var parser = new TSql170Parser(true, 0);
            var fragment = parser.Parse(new StringReader(script), out var parseErrors);

            if (parseErrors.Count > 0)
            {
                Console.WriteLine(parseErrors[0].Message);
            }
        }

Error Message : Incorrect syntax near ':'

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