mirror of
https://github.com/PhoenixPE/PhoenixPE.git
synced 2025-09-17 02:28:09 +02:00
allow writing empty string in JSONWrite
This commit is contained in:
@@ -1641,7 +1641,7 @@ System,EndLocal
|
|||||||
// Syntax.........: JSONWrite,<JSONFile>,<Path>,<Value>
|
// Syntax.........: JSONWrite,<JSONFile>,<Path>,<Value>
|
||||||
// Parameters.....: #1 JSONFile - Full path to the JSON filed to edit.
|
// Parameters.....: #1 JSONFile - Full path to the JSON filed to edit.
|
||||||
// #2 Path - GJSON Path notation used to locate the value to write.
|
// #2 Path - GJSON Path notation used to locate the value to write.
|
||||||
// #3 Value - The value to write.
|
// #3 Value - The value to write. (Can be empty)
|
||||||
// Return values..: #r - Returns
|
// Return values..: #r - Returns
|
||||||
// Author.........: Homes32
|
// Author.........: Homes32
|
||||||
// Remarks........: jj.exe Homepage: https://github.com/tidwall/jj
|
// Remarks........: jj.exe Homepage: https://github.com/tidwall/jj
|
||||||
@@ -1656,7 +1656,6 @@ GetParam,3,%Value%
|
|||||||
|
|
||||||
If,Not,ExistFile,%JSONFile%,Halt,"JSONWrite Syntax Error: The file [%JSONFile%] does not exist."
|
If,Not,ExistFile,%JSONFile%,Halt,"JSONWrite Syntax Error: The file [%JSONFile%] does not exist."
|
||||||
If,%Path%,Equal,"",Halt,"JSONWrite Syntax Error: You must specify an JSON Path."
|
If,%Path%,Equal,"",Halt,"JSONWrite Syntax Error: You must specify an JSON Path."
|
||||||
If,%Value%,Equal,"",Halt,"JSONWrite Syntax Error: You must specify an value to write."
|
|
||||||
|
|
||||||
ShellExecute,Hide,"%Tools%\%HostArch%\jj.exe","-v #$q%Value%#$q -i #$q%JSONFile%#$q -o #$q%JSONFile%#$q #$q%Path%#$q"
|
ShellExecute,Hide,"%Tools%\%HostArch%\jj.exe","-v #$q%Value%#$q -i #$q%JSONFile%#$q -o #$q%JSONFile%#$q #$q%Path%#$q"
|
||||||
If,Not,#r,Equal,0,Halt,"JSONWrite ERROR: Failed to write the value of [%Value%] to [%Path%] in [%JSONFile%]."
|
If,Not,#r,Equal,0,Halt,"JSONWrite ERROR: Failed to write the value of [%Value%] to [%Path%] in [%JSONFile%]."
|
||||||
|
Reference in New Issue
Block a user