title: Sanitize JSON with php
body: <p>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?</p>
  
  <p>PHP filter_var(): <a href="http://php.net/manual/en/function.filter-var.php" rel="noreferrer">http://php.net/manual/en/function.filter-var.php</a></p>
  
  <p>PHP FILTER CONST: <a href="http://php.net/manual/en/filter.filters.sanitize.php" rel="noreferrer">http://php.net/manual/en/filter.filters.sanitize.php</a></p>