s dyn={}
d dyn.%Set("asNumber",123)
d dyn.%Set("asString",123,"string")


w dyn.%ToJSON()

{"asNumber":123,"asString":"123"}

Is it possible that you added index definitions after you filled the table with data?

If that is the case, then those indices are not built ("empty"), and so if the query uses them, then it returns no data. In such case you have to build your indices manually via ##class(MML.Cities).%BuildIndices().

Try

Index TagsArrayIndex On (TagsArray(ELEMENTS), TagsArray(KEYS));

I've contacted WRC about this, and their answer is that there is no built-in way.

They offered a workaround of enabling unauthenticated access and checking AUTHORIZATION header manually.

Thank you. We are now using Java gateway and we want to replace this with something more native.  So it seems that writing own implementation in COS is the only option left. I was hoping that someone has already done that ;)

Thanks, but unfortunately I am unable to find suitable DLL for Win64 with crypt function. I have found 32bit version (GnuWin32/crypt), but it does not work on 64bit environment.

I am trying to generate same output as http://php.net/manual/en/function.crypt.php crypt function (CRYPT_MD5 flavor).

So for example

$salt=crypt("2Ggaobjb","$1$1a2b3c4d$");

returns $1$1a2b3c4d$Y5tt50CQ12xW2saeYnI43, which is not same as pure MD5 hash (like $SYSTEM.Encryption.MD5Hash).

From documentation it seems that crypt creates derived hash based on MD5, but it is not the same.