Working example:

Class dc.test Abstract ]
{

/// d ##class(dc.test).Test1()
ClassMethod Test1() [ ProcedureBlock = 0 ]
{
  new active,reactive,info,i
  
  kill info

  set active = 1
  set reactive = 2

  for i="active","reactive" {
    set info(i)= @i
  }

  zw info
}

/// d ##class(dc.test).Test2()
ClassMethod Test2() [ PublicList = (active, reactive) ]
{
  new activereactive
  kill info

  set active = 1
  set reactive = 2

  for i="active","reactive" {
    set info(i)= @i
  }

  zw info
}

}

What will the following code output?

resptext="{""access_token"":""4SDFDSFDSF-aSDASDASD"",""expires_in"":""3300"",""refresh_token"":"""",""scope"":""sms_send"",""token_type"":""Bearer""}"

sc ##class(%ZEN.Auxiliary.jsonProvider).%ParseJSON(resptext,,.pObject,1)
i $$$ISOK(sc{
  pObject,!!,
    pObject."access_token",!,
    pObject."expires_in",!
  arr arr="" pObject.%CopyToArray(.arrzw arr
}else{
  d $system.OBJ.DisplayError(sc)
}

My result (2018.1):

USER>^test
1@%ZEN.proxyObject
 
4SDFDSFDSF-aSDASDASD
3300
arr("access_token")="4SDFDSFDSF-aSDASDASD"
arr("expires_in")=3300
arr("refresh_token")=""
arr("scope")="sms_send"
arr("token_type")="Bearer"

Hi Adrian.

Made a small example:

#dim rs As %ResultSet
   
pid=4652
   
rs=##class(%ResultSet).%New("%SYS.ProcessQuery:VariableByPid")
   
filter="","a*" {
 !,"Filter = ",$$$quote(filter),!
 rs.Execute(pid,,,,filter)
 while rs.Next() {
   "Name = ",rs.Get("Name"),", Value = ",rs.Get("Value"),!
 }
}

Result:

USER:4652>a="11",b="22",a1="33" w $job
4652

USER:1392>w $job,! ^dc
1392
 
Filter = ""
Name = a, Value = 11
Name = a1, Value = 33
Name = b, Value = 22
 
Filter = "a*"
Name = a, Value = 11
Name = a1, Value = 33

Still another option:

Class dc.test Extends %Persistent
{

Property JSONData As list Of %String SqlListType = SUBNODE ];

ClassMethod Test()
{
  ..%KillExtent()
  
  l=$lb("apple","pear","plum"),$lb({"Name":"Kyle"}.%ToJSON(),{"Name":"Evgeny"}.%ToJSON()) {
    t=..%New()
    t.JSONData.InsertList(l)
    t.%Save()
  }

  zw @$system.Dictionary.comMemberKeyGet($this,$$$cCLASSstorage,$$$nameDefaultStorageNameGet,$$$cSDEFdatalocation)
  
  rs=##class(%SQL.Statement).%ExecDirect(,"select distinct json_arrayagg(JSONData %foreach(test)) from dc.test_JSONData")
  while rs.%Next() {
    jsonStr=rs.%GetData(1),
      json=[].%FromJSON(jsonStr)

    !,jsonStr,", %Size()=",json.%Size(),!
  }
}

}

Result:

USER>##class(dc.test).Test()
^dc.testD=2
^dc.testD(1)=$lb("")
^dc.testD(1,"JSONData")=3
^dc.testD(1,"JSONData",1)="apple"
^dc.testD(1,"JSONData",2)="pear"
^dc.testD(1,"JSONData",3)="plum"
^dc.testD(2)=$lb("")
^dc.testD(2,"JSONData")=2
^dc.testD(2,"JSONData",1)="{""Name"":""Kyle""}"
^dc.testD(2,"JSONData",2)="{""Name"":""Evgeny""}"
 
["apple","pear","plum"], %Size()=3
 
[{"Name":"Kyle"},{"Name":"Evgeny"}], %Size()=2

Doc:

if I call giveMeAFalseMe from Cache when it's returning "true" or "false", Cache will translate "true" into a truthy %Boolean return value, right?

No, it does zenBool, which is on the client side.

The important thing is that #server()# always returns a string, for example:

<script language="cache" method="giveMeAFalse" arguments="" procedureblock='1' returntype="%Integer">return 4</script>

var bool #server(..giveMeAFalse())#;
console.log("bool = " bool);
console.log("typeof bool = "typeof bool);

Result:
bool = 4
typeof bool =  string

PS: you can further explore the sources of the #server()# -> cspHttpServerMethod() -> cspProcessResponse(), which are in the file cspxmlhttp.js.

See zenConvertType() [///Converts a typed value returned from the server to an appropriate JS type] from zenutils.js.

Try this:

<script src="zenutils.js"></script>

<script language="javascript">
function isItActuallyFalse() {

var bool zenConvertType('BOOLEAN',#server(..giveMeAFalse())#);

...
}

</script>

<script language="cache" method="giveMeAFalse" arguments="" returntype="%Boolean" procedureblock='1'>return $$$NO</script>

or

var bool zenBool(#server(..giveMeAFalse())#);
...
<script language="cache" method="giveMeAFalse" arguments="" returntype="%Boolean" procedureblock='1'>return "false"</script>

No.
If you beware to use %occLibrary, you may look into side %Regex.Matcher

Here is another documented solution:

#include %systemInclude
  n
  try{

    #define TAB $c(9)
    
    s csv="""ABC,"_$c(10)_" Company,"",""123 Main St, Ste 102"",""Anytown, DC"",10001,234-567-8901,""Anytown"_$$$TAB_"DC"""

    ##class(%DeepSee.TermList).%ParseCSVRecord(csv,.arr)

    csv,!!,$$WriteCSVRecord(.arr,$$$TAB)

  }catch(ex){
    "Error "ex.DisplayString(),!
  }


WriteCSVRecord(&pRecord, pDelim=",", pEncode=$$$YES{
  // made on the basis of the method %WriteCSVRecord
  Set ""
  Set $O(pRecord(""))
  While (k'=""{
    Set tValue $G(pRecord(k))
    Set:$G(pEncodetValue $ZCVT(tValue,"O","UTF8") 

    Set $S((tValue["""")||(tValue[",")||(tValue[pDelim):$$$quote(tValue),1:tValue)
    Set $O(pRecord(k))
    Set:k'="" pDelim
  }
  Quit r
}

Result:

USER>^dc
"ABC,
      Company,","123 Main St, Ste 102","Anytown, DC",10001,234-567-8901,"Anytown        DC"
 
"ABC,
      Company," "123 Main St, Ste 102"  "Anytown, DC"   10001   234-567-8901    "Anytown        DC"
#include %systemInclude

    csv="ABC Company,""123 Main St, Ste 102"",""Anytown, DC"",10001,234-567-8901"
    list=$$CSVtoList^%occLibrary(csv)

    i=1:1:$ll(lists:$li(list,i)["," $li(list,i)=$$$quote($li(list,i))
        
    csv,!,$lts(list,$c(9))

Result:

USER>^test
ABC Company,"123 Main St, Ste 102","Anytown, DC",10001,234-567-8901
ABC Company     "123 Main St, Ste 102"  "Anytown, DC"   10001   234-567-8901