NSJSON formatting issue
Hi,
I am using nsjson plugin to modify Google chrome's preferences file.
I want to add a new field (urls_to_restore_on_startup) in the session node if it is not already present. But the new node added has faulty format which is corrupting the preferences file.
I am doing this:
nsJSON::Set "session" "urls_to_restore_on_startup" /index 0 /Value '"http://www.nsis.sourceforge.net"' ;changing start page
It should result like this
Preferences.json
.
.
"session": {
"restore_on_startup": 4,
"restore_on_startup_migrated": true,
"urls_to_restore_on_startup": [ "http://www.nsis.sourceforge.net" ]
}
But instead it is like this : -
Preferences.bad
.
.
"session": {
"restore_on_startup": 4,
"restore_on_startup_migrated": true,
"urls_to_restore_on_startup":{
"http://www.nsis.sourceforge.net"
}
}
The curly braces are added here which are ruining everything.
How to get the right format ??