Documentation IndexFetch the complete documentation index at: /llms.txtUse this file to discover all available pages before exploring further.
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
.json5
{ // 允许注释 database: { host: "localhost", port: 5432, name: "myapp", }, server: { port: 3000, timeout: 30, }, features: { auth: true, rateLimit: true, }, }
import config from "./config.json5"; config.database.host; // => "localhost" config.server.port; // => 3000 config.features.auth; // => true
import { database, server, features } from "./config.json5"; console.log(database.name); // => "myapp" console.log(server.timeout); // => 30 console.log(features.rateLimit); // => true
Bun.JSON5.parse()
const data = Bun.JSON5.parse(`{ name: 'John Doe', age: 30, hobbies: [ 'reading', 'coding', ], }`); console.log(data.name); // => "John Doe" console.log(data.hobbies); // => ["reading", "coding"]