$zcvt("abc/def","O","JSON")="abc/def" -> Why?
Checked on Cache 2018.1.7 and IRIS 2022.2
write $zconvert("abc/def","O","JSON")
"abc/def"
ObjectScriptObjectScript
Why isn't it "abc\/def" ?
Checked on Cache 2018.1.7 and IRIS 2022.2
write $zconvert("abc/def","O","JSON")
"abc/def"
ObjectScriptObjectScript
Why isn't it "abc\/def" ?
See table at this link
https://docs.intersystems.com/irislatest/csp/docbook/DocBook.UI.Page.cls...
You likely need "JS" transformation:
USER>write $zconvert("abc/def","O","JS") abc\/def
The quoting of the slash character, "/", is optional in JSON. When doing a $ZCVT output conversion ,"O", in JSON IRIS chooses to not quote the slash character. It makes the output easier to read. However, $ZCVT doing an input conversion, "I", will recognize a quoted slash character in JSON input. E.g.:
USER>w $zcvt("abc\/def","I","JSON")
abc/def
USER>w $zcvt("abc/def","I","JSON")
abc/def