I always use filter_var($var, FILTER, FLAG); when I get data from $_GET, $_POST and so on, but now this data is a JSON string but I didn't find any filter to sanitize JSON. Anyone know how to implement this filter?
PHP filter_var(): http://php.net/manual/en/function.filter-var.php
PHP FILTER CONST: http://php.net/manual/en/filter.filters.sanitize.php