WQL for developers

 WQL is employed both by web users (in JSON) and by developers (in Ruby).


Developers should have no problem translating the examples from JSON to Ruby, because WQL's structure is the same in both. For example, in Ruby, we might express a simple WQL statement as follows:

{ :name => 'Help' }

while the same in JSON would be

{ "name" : "Help" }

The above example is about as different as the two representations get. Both surround hashes with curly brackets and arrays with square brackets, but Ruby WQL uses symbols which start with colons, like :name, while JSON WQL puts both keys and values in double quotes. And those keys and values are separated by => in Ruby and : in JSON. In all other cases, whether you're writing in Ruby or JSON your WQL will use the same basic representation for the same basic concepts.