Demo for [F1], [F7] and [Home]:

key(##class(%xsd.hexBinary).XSDToLogical("1B5B31387E"))="F7"
key(##class(%xsd.hexBinary).XSDToLogical("1B4F50"))="F1"
key(##class(%xsd.hexBinary).XSDToLogical("1B5B317E"))="Home"
u:$zu(96,14)=1 0:(:"+S""Input: ",*u:$zu(96,14)=1 0:(:"-S")

;zzdump $key
   
"You press [",$g(key($key),"unknown"),"]",!
  • error code 100 do not exist, but there is a code 101. See documentation: General Error Messages
    USER>s $mvv(58)="es"
     
    USER>d $SYSTEM.OBJ.DisplayError($System.Status.Error(101))
     
    ERROR #101: Nivel puntero superior:    nº bloques=%1      %2kb (%3% total)
  • error with some positive codes are reserved by the system, so you can't use them.
    Two error codes, 83 and 5001, are provided to enable you to generate your own custom error messages.

Yes, see part "Creation of a custom error message dictionary"

PS: you can even use the letters, for example:

<?xml version="1.0" encoding="UTF-8"?>
<MsgFile Language="en">
  <MsgDomain Domain="asd">
    <Message Id="a" Name="ErrorName1">Message about some error 1</Message>
    <Message Id="b" Name="ErrorName2">Message about some error 2 %1 %2</Message>
  </MsgDomain>
</MsgFile>

It is not clear what it will give.
To Richard need to save the binary data encoded in hex.

For example, instead of '0x2122232425262728292A2F' to the database should persist the value !"#$%&'()*/

USER>w $c(33,34,35,36,37,38,39,40,41,42,47)
!"#$%&'()*/

USER>##class(%xsd.hexBinary).LogicalToXSD($c(33,34,35,36,37,38,39,40,41,42,47))
2122232425262728292A2F

USER>zzdump ##class(%xsd.hexBinary).XSDToLogical("2122232425262728292A2F"; 0x omitted
 
0000: 21 22 23 24 25 26 27 28 29 2A 2F                        !"#$%&'()*/

URL and URI Conversions

Try:
Set tURL=..Adapter.URL_"/claims/"_##class(%CSP.Page).EscapeURL(pRequest.claimBlob)
or
Set tURL=..Adapter.URL_"/claims/"_$zcvt($zcvt(pRequest.claimBlob,"O","UTF8"),"O","URL")

USER>w $zcvt($zcvt($c(0,1,2,1025),"O","UTF8"),"O","URL")
%00%01%02%D0%81
USER>##class(%CSP.Page).EscapeURL($c(0,1,2,1025))
%00%01%02%D0%81

The jsonProvider code may also be invoked from a non-Zen context by calling one of the following APIs:

  • %WriteJSONFromArray
  • %WriteJSONFromObject
  • %WriteJSONStreamFromArray
  • %WriteJSONStreamFromObject
  • %ConvertJSONToObject

proof

Example:

##class(%ZEN.Auxiliary.jsonProvider).%WriteJSONStreamFromObject(.stream,..%OpenId(1),,,1,"aelqoc")
"<- json = ",stream.Read(),!