Open
Description
import * as HJSON from 'hjson';
const text1 = "{test: 123}" // type taken from the config file
console.log(text1); // "{test: 123}"
// then sequential reading, modification and writing of the config is simulated
const data1 = HJSON.parse(text1, {keepWsc:true});
console.log(data1); // {test: 123}
delete data1.test;
const text2 = HJSON.stringify(data1, {keepWsc:true});
console.log(text2); // "{test: undefined}"
const data2 = HJSON.parse(text2, {keepWsc:true});
console.log(data2); // {test: 'undefined'} // unexpectedly undefined becomes a string
Metadata
Metadata
Assignees
Labels
No labels