Skip to content

[api] Add parseConfigFileTextToJson() helper #64634

Description

Acknowledgement

  • I acknowledge that issues using this template may be closed without further explanation at the maintainer's discretion.

Comment

Please consider adding the parseConfigFileTextToJson() helper. For some reason, it was not part of microsoft/typescript-go#4888.

Currently, in a workflow that uses parseJsonConfigFileContent() and a user-supplied JSON string is processed, there is no way to get and report parse diagnostics.

JSON.parse() does the job, but the quality of diagnostics is not the same. Creating a virtual file and using readConfigFile() is another workaround, but I would need to use the virtual file system only to handle this case.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Needs InvestigationThis issue needs a team member to investigate its status.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions