PHP JSON Validation Engine