Environment Variable
A key-value pair set in the operating system environment, used to configure application behavior.
Detail Teknis
Environment Variable is defined by RFC 8259 and ECMA-404. It supports six data types: string, number, object, array, boolean, and null. JSON numbers have no distinction between integer and float — implementations must handle precision carefully (JavaScript's Number.MAX_SAFE_INTEGER is 2^53 - 1). JSON does not support comments, trailing commas, or single quotes, which are common sources of parse errors. JSON5 and JSONC extend the format with these developer-friendly features.
Contoh
```javascript
// Parse JSON with error handling
try {
const data = JSON.parse(rawString);
console.log(data.name); // access properties
} catch (e) {
console.error('Invalid JSON:', e.message);
}
// Serialize with formatting
const pretty = JSON.stringify(obj, null, 2);
```