I am trying to register a new user on Drupal7 via services with JSON. Actually I am posting info from JAVA (android) with JSON format to the server with services module enabled. A sample successful JSON post is:
{
"name": "erfan",
"pass": "1234",
"mail": "[email protected]",
"status": "1"
}
URL: [siteURL]/[endpoint]/user/register
I was successful creating users with basic info such as name,email,status.
I have added custom fields like field_address
, field_phone
, etc to the web site and want to send them via JSON to the server.
The problem is I can not figure out how to post these data to the server and couldn't find any documentation about it. My trial and error approach was not successful too, because I am not good in PHP coding. So please help me. Thanks.
$account->field_name[$language][$delta][$column_name]
if that helps. An example for a text field might be$account->field_foo[LANGUAGE_NONE][0]['value']