Uploaded image for project: 'CiviCRM'
  1. CiviCRM
  2. CRM-10134

API ajax doesn't handle json properly

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Trivial
    • Resolution: Fixed/Completed
    • Affects Version/s: 4.1.2
    • Fix Version/s: 4.1.3, 4.3.0
    • Component/s: CiviCRM API
    • Labels:
      None

      Description

      Chaining API is making an ajax interface way faster (cuts the requests). Hovever, GET or POST don't handle natively super well multi-dimensional objects (eg api.sub.action = array (xxx)

      I fixed/improved the civicrm/api/Json that works with json params (in POST)
      entity=event,
      action=getsingle
      params={"name":"test event","api.participant.create":{"contact_id":42,"role_id":1}}"

      So params is a string containing a json encoded param, that can be as complex as wanted

      X+

        Attachments

          Activity

            People

            • Assignee:
              xavier xavier dutoit
              Reporter:
              xavier xavier dutoit
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: