Decode JSON data rather than encode it.
Correct phpdoc.
Add isAssoc() function.
Add isEmail() function.
Added a filter to validate query input.