can we read a JSON file in NSIS without using nsjson plugin?
Announcement
Collapse
No announcement yet.
read json without nsjson
Collapse
X
-
I am sorry for the basic questions. I have this in my json file
{
"BLD_BRH" : "****",
"RLS_STR" : "****",
"RLS_FIXED" :
}
i am setting this nsJSON::Set /file $EXEDIR\manifest.json . but I just need to read BLD_BRH and RLS_FIXED. I don't see anything here in examples
Comment
-
PHP Code:Section
InitPluginsdir
FileOpen $0 "$PluginsDir\temp.txt" w
FileWrite $0 '{"BLD_BRH" : "1234","RLS_STR" : "5678","RLS_FIXED" : "invalid example"}'
FileClose $0
nsJSON::Set /file "$PluginsDir\temp.txt"
nsJSON::Get "BLD_BRH" /end
Pop $0
MessageBox mb_ok $0
SectionEnd
IntOp $PostCount $PostCount + 1
Comment
-
I don't want to write anything. there is already a file that I just need to read.
{
"BLD_BRH" : "****",
"RLS_STR" : "****",
"RLS_DFT" : [
[
],
],
"RLS_FIXED" :"***",
}
Section
ClearErrors
Push $0
nsJSON::Set /file "$EXEDIR\eg.json"
nsJSON::Get "RLS_STR" /end
Pop $0
MessageBox mb_ok $0
SectionEnd
it shows blank
Comment
Comment