Skip to content

JSON de/serialization error #42

Open
@DeanOutlaw

Description

@DeanOutlaw

Using the createPayRun in the AU payroll SDK sample returns error
Error occurred during JSON de/serialization. Cannot deserialize the current JSON object (e.g. {"name":"value"}) into type 'Paycycle.API.DTO.AU.PayRun.UpdatePayRunRequest' because the type requires a JSON array (e.g. [1,2,3]) to deserialize correctly.
To fix this error either change the JSON to a JSON array (e.g. [1,2,3]) or change the deserialized type so that it is a normal .NET type (e.g. not a primitive type like integer, not a collection type like an array or List<T>) that can be deserialized from a JSON object. JsonObjectAttribute can also be added to the type to force it to deserialize from a JSON object.
Path 'PayrollCalendarID', line 1, position 21.
I copied the example code directly into my script and replaced the setPayrollCalendarID and other settings.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions