Announcement
Collapse
No announcement yet.
read json without nsjson
Collapse
X
-
my actual file is not empty... it looks like i have to use file and string instructions
-
There is known bug in this plug-in, it does not support empty arrays.
Leave a 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
Leave a 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
Leave a comment:
-
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
Leave a comment:
-
NSIS does not have native JSON support, you are stuck with the plug-in.
If the file is really small and simple you might be able to use the NSIS file and string instructions but I don't really recommend it.
Leave a comment:
-
read json without nsjson
can we read a JSON file in NSIS without using nsjson plugin?Tags: None
Leave a comment: