I have some code for this, but you will have to modify it, hopefully what I paste here won't have too many dependencies. The public function has a osh_ parameter which is like a json string that gets turned into a hash immediately, so you can just swap out that and pass a hash since I won't be providing the code to turn json into hash.
This code needs to reside in alias.e, I think.
Looking at it now, watch the PARMs var, thats the hash, and calls to hash_get_r can be swapped out by direct code to access the hash val.