in the post.php file there is the function save($values = null). simply add the following code to the end of this file
foreach($values as $key => $value){
if(strlen(strstr($key,’id’))==0 &&
strlen(strstr($key,’type’))==0 &&
strlen(strstr($key,’status’))==0 &&
strlen(strstr($key,’title’))==0 &&
strlen(strstr($key,’content’))==0 &&
strlen(strstr($key,’author’))==0 &&
strlen(strstr($key,’categories’))==0 &&
strlen(strstr($key,’tags’))==0)//it must be a custom_field, so add it
update_post_meta($this->id,$key,$value);
}
$wp_post = get_post($this->id);
$this->import_wp_object($wp_post);
return $this->id;
}
after that you should be able to create a post with custom values.
According to your example simply call
http://localhost/public_html/website/?json=posts/create_post&dev=1&nonce=eaa7969ea5&categories=competitions,photos&title=hello%20world%204&content=”mycontent”&competition=summer&status=publish
to add the value “summer” to your field competition