Title: Accepting JSON post
Last modified: August 22, 2016

---

# Accepting JSON post

 *  [gcall166](https://wordpress.org/support/users/gcall166/)
 * (@gcall166)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/accepting-json-post/)
 * _
    I am attempting to ‘post’ JSON using this, but nothing is appearing on the
   destination page. Can you let me know what I am missing? Thx.
 *     ```
       function makeJSON_(object, options) {
         if (options.format == FORMAT_PRETTY) {
           var jsonString = JSON.stringify(object, null, 4);
         } else if (options.format == FORMAT_MULTILINE) {
           var jsonString = Utilities.jsonStringify(object);
           jsonString = jsonString.replace(/},/gi, '},\n');
           jsonString = prettyJSON.replace(/":\[{"/gi, '":\n[{"');
           jsonString = prettyJSON.replace(/}\],/gi, '}],\n');
         } else {
           var jsonString = Utilities.jsonStringify(object);
         }
         if (options.language == LANGUAGE_PYTHON) {
           // add unicode markers
           jsonString = jsonString.replace(/"([a-zA-Z]*)":\s+"/gi, '"$1": u"');
         }
         return jsonString;
       }
   
       var JSON_DESTINATION_URL = 'http://rpssolar.com/?page_id=1822';
   
       function sendJson_(json) {
          var options =   {
            "contentType":"application/json",
            "method" : "post",
            "payload" : json
          };
       ```
   

The topic ‘Accepting JSON post’ is closed to new replies.

## Tags

 * [json](https://wordpress.org/support/topic-tag/json/)
 * [post](https://wordpress.org/support/topic-tag/post/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 0 replies
 * 1 participant
 * Last reply from: [gcall166](https://wordpress.org/support/users/gcall166/)
 * Last activity: [11 years, 6 months ago](https://wordpress.org/support/topic/accepting-json-post/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
