Skip to content

"unexpected end of JSON input" when result is null #11

@nzdjb

Description

@nzdjb

I'm making calls to an API that returns null for some calls (https://metaname.net/api/1.1/doc). When I successfully make these calls, I receive an error of "unexpected end of JSON input".

Example debug output:

--> {"jsonrpc":"2.0","method":"configure_zone","params":["xxxx","xxxxxxxxxxxxxxxxxxxxxxx","testzone.nz",[],null],"id":2283}
<-- {"result":null,"jsonrpc":"2.0","id":2283}

The spec doesn't explicitly say whether null is an allowed result value, but the implication seems to be that any value is valid. So a successful response with a result of null should not produce an error and should write nil to the request result.

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