JSON not well formed error

JSON not well formed error

Hi,

can anyone tell me why I always get JSON is not well formed error message if I try to create a new contact in Zoho Books with the following code?

Error message: {"message":"JSON is not well formed","code":1038}

  1. response = zoho.books.createRecord("contacts", "123456",
  2. { "contact_name" : input.first_name, "company_name" : input.account_name_company,
  3. "contact_persons" : {{ "salutation" : input.salutation, "first_name" : input.first_name, "last_name" : input.last_name, "email" : input.email, "phone" : input.phone, "mobile" : input.mobile, "is_primary_contact" : true }},
  4. "billing_address" : { "address" : input.mailing_street, "city" : input.mailing_city, "state" : input.mailing_state, "zip" : input.mailing_zip, ("country") : input.mailing_country },
  5. "custom_fields" : {{ "index" : 1, "value" : input.type_of_customer }, { "index" : 2, "value" : "YES" }, { "index" : 3, "value" : input.payment_plan_hidden }, { "index" : 4, "value" : input.Referrer }}
  6. });

Regards