-
Problem report
-
Resolution: Fixed
-
Trivial
-
7.2.4
-
S25-W44/45, S25-W46/47
-
1
Steps to reproduce:
1. Create any item that returns JSON string (db.odbc.get[] in my case)
2. Add pre-processing step:
Name: Javascript
Parameters: return JSON.stringify(JSON.parse(value), null, 4)
3. Run "Get Value and Test"
Result:
JSON is formatted but with the leading indentation stripped off.
[
{
"DBEVENT_PROCESS_LOG_ID": "1",
"PROCESS_NAME": "asdf",
"PACKAGE_NAME": "N/A",
...
Expected:
JSON is formatted and includes the leading spaces..
[
{
"DBEVENT_PROCESS_LOG_ID": "1",
"PROCESS_NAME": "asdf",
"PACKAGE_NAME": "N/A",
...
Important: When the item values are actually collected, the leading spaces are kept. So this behaviour is just experienced when testing preprocessing.