Remove the last member AsStr function!
Catch exceptions at a higher level in the websockets interface.
Return a JSON object rather than a JSON encoded string.