Skip to content

jsonRPCClient with Assoc. Array Parameters #4

Description

@chaintng

I need to send associative array as parameter via json rpc

for example.

{"sendDate":"2013-07-06", "packageId":1}

But if i type like
$myExample->getContent(array('sendDate' => '2013-06-17', 'packageId' => 1));

the $params wil show
[{"sendDate":"2013-07-06", "packageId":1}]

So it not correct.

I think there must be a fix near here.

    if (is_array($params)) {
        // no keys
        $params = array_values($params);

using array_pop instead of array_values work fine.

Please advise

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions