Luracast Restler 2.0 CRUD - JSON一次发布多个元素

I am trying to do a POST using Luracast Restler 2.0(CRUD) and the input json contains multiple elements.

[{"id":"1","email":"test@gmail.com"},{"id":"2","email":"test2@gmail.com"}]

It works fine with just one element set however it fails with multiple elements . Any one knows what is the solution. Thanks

Modify the post function in the CRUD example as shown below

function post($request_data=NULL) {
    if(key_exists(0, $request_data)){
        //array with nummeric index found
        //post multiple
        $r = array();
        for ($i = 0; $i < count($request_data); $i++) {
            if($request_data[$i])
                $r[]=$this->dp->insert($this->_validate($request_data[$i]));
        }
        return $r;
    }
    //post single
    return $this->dp->insert($this->_validate($request_data));
}

Now it will accept both single and multiple entry