Announcement

Collapse
No announcement yet.

read json without nsjson

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • shekara
    replied
    my actual file is not empty... it looks like i have to use file and string instructions

    Leave a comment:


  • Anders
    replied
    There is known bug in this plug-in, it does not support empty arrays.

    Leave a comment:


  • shekara
    replied
    even without that, no difference. it is the same blank message

    Leave a comment:


  • Anders
    replied
    trailing commas are not allowed in JSON

    Leave a comment:


  • shekara
    replied
    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:


  • shekara
    replied
    will check this out..... thank you

    Leave a comment:


  • Anders
    replied
    PHP Code:
    Section
    InitPluginsdir
    FileOpen 
    $"$PluginsDir\temp.txt" w
    FileWrite 
    $'{"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:


  • shekara
    replied
    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:


  • Anders
    replied
    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:


  • shekara
    started a topic read json without nsjson

    read json without nsjson

    can we read a JSON file in NSIS without using nsjson plugin?
Working...
X