Updated clientstate database to support dictionary like access and json output