json_encoding instead of printing results