title: insert large string into json object
body: <p>i have problem when insert large string into json
  i need to make sure there would be no mistakes when insert this large string into json object by filter the article from special characters like (!@#$%^&amp;*()\|';:./) and smile faces before insert it </p>
  
  <p>for example
  if i have this json </p>
  
  <pre><code>{
    "Article": "article text"
  }
  </code></pre>
  
  <p>and this in xcode </p>
  
  <pre><code>- (IBAction)SendArticleButton:(id)sender {
       NSString *Article       = ArticleTextField.text;
       NSString *ArticleJson   = [NSString stringWithFormat:@"Article={ \"Article\": \"%@\" }",Article];
       NSData *PostData = [ArticleJson dataUsingEncoding:NSUTF8StringEncoding];
  
  
  NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"http://example.com/InsertJson.php"]];
  
  [request setValue:@"gzip" forHTTPHeaderField:@"Accept-Encoding"];
  [request setValue:@"application/x-www-form-urlencoded" forHTTPHeaderField:@"Content-Type"];
  [request setHTTPBody:PostData];
  [request setHTTPMethod:@"POST"];
  
  NSError *error = nil;
  NSURLResponse *response = nil;
  NSData *data = [NSURLConnection sendSynchronousRequest:request returningResponse:&amp;response error:&amp;error];
  
  
  
  }
  </code></pre>
  
  <p>php code</p>
  
  <pre><code>$Article = $_POST['Article'];
  
            header ('Content-Type: text/html; charset=UTF-8'); 
  $con    = mysql_connect("xxxxx","xxxxxx","xxxxx");
            mysql_select_db("xxxxx", $con);
            mysql_query("SET NAMES utf8");
  
  $Article = utf8_encode(trim($Article));
  
   mysql_query("INSERT INTO `xxxxx`.`xxxxx` (`id`, `Article`) VALUES (NULL, '$Article');");
  </code></pre>