JSONC related APIs
Bun.JSONC object | API Reference | Bun BuildDocsReferenceGuidesBlogDiscord/Bun/JSONCFparse BuildDocsReferenceGuidesBlogDiscord /Bun/JSONCFparse JSONCnamespace JSONC function parse(input: string): unknown; @param input @returns
Search the reference...
/
namespace
Parse a JSONC (JSON with Comments) string into a JavaScript value.
Supports both single-line (http://) and block comments (/* ... */), as well as trailing commas in objects and arrays.
The JSONC string to parse
A JavaScript value
const result = Bun.JSONC.parse(`{
// This is a comment
"name": "my-app",
"version": "1.0.0", // trailing comma is allowed
}`);
Resources
ReferenceDocsGuidesDiscordMerch StoreGitHubBlogToolkit
RuntimePackage managerTest runnerBundlerPackage runnerProject
Bun 1.0Bun 1.1Bun 1.2Bun 1.3RoadmapContributingLicenseBaked with ❤️ in San Francisco
We're hiring →Bun.JSONC object | API Reference | Bun,AI智能索引,全网链接索引,智能导航,网页索引
- JSONC related APIs