The plug-in will set the error flag if the tree or node does not exist. If you think it is possible the tree or node may not exist, you should check the error flag before reading from the stack. Remember to clear the error flag first if necessary. The error flag is the only way to distinguish a definite error.

I have implemented /keys and fixed the Delete crash but I am working on a new feature for console application execution for JSON input/output so will upload a new version when done.

With the ansi version, the message box reads "testValue" as expected, but with the unicode version is just says "t".

Sounds like you are using the ansi version for both ansi and unicode installers.

By the way, if the plugins are copied correctly to both '${NSISDIR}\plugins\x86-ansi' and '${NSISDIR}\plugins\x86-unicode', then you don't need to use !addplugindir. 'Unicode True' does that work for you.

When something in a ANSI installer is unexpectedly a single character then it is a clear indication that something was not converted from Unicode to ANSI. The other way around could be anything, a plugin mismatch or bug. A missing conversion bug to Unicode usually looks Chinese.

I have another feature request:
It would be great if /index accepted negative numbers to get/set/delete from the end of an array/node.
For example, /index -1 means the last element, /index -2 means the second-last element and so on.

Right now, this is achieved by getting the count of elements, decrementing, then getting/setting/deleting the required element. A negative index would streamline this process.

The REST method I'm calling in the "Url" may have an empty response (e.g. only returns 200 OK).
In such case, the returned Response tree has the "Output" node populated with the response from the previous call to another REST method, instead of returning an empty "Output" node.

I'm having a problem with the latest build where nsJSON::Serialize is leaving the filepath on the stack. I know there was an issue fixed recently where one too many values were popped but now the reverse seems to be true...

I suspect that the old code was always popping file, even if it wasn't needed, whereas the new code pushes it back on the stack even if it was needed

On a separate note, I have found that doing an http request with Verb=POST and DataType=JSON sends a request where the post data is unicode with Content-Type: application/x-www-form-urlencoded
Is there a way to get this to send as UTF-8 with Content-Type: application/json ?

Thanks

Last edited by Marshallx7; 1st November 2016 at 23:20.
Reason: extra request

How are you supposed to delete a tree? Especially the "default"? tree?

Quote:

1.1.1.0 - 21st November 2017
* Fixed JSON with syntax errors still being parsed without setting the error flag.
* Fixed Set function not replacing the root value if the value was an array.
* Fixed Delete function not deleting the root node and tree.