Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error on GetSegments #5

Open
Defprog86 opened this issue Aug 5, 2024 · 0 comments
Open

Error on GetSegments #5

Defprog86 opened this issue Aug 5, 2024 · 0 comments

Comments

@Defprog86
Copy link

Error on GetSegments call.

brevo_csharp.Client.ApiException: Cannot deserialize the current JSON array (e.g. [1,2,3]) into type 'brevo_csharp.Model.GetSegmentsSegments' because the type requires a JSON object (e.g. {"name":"value"}) to deserialize correctly.
To fix this error either change the JSON to a JSON object (e.g. {"name":"value"}) or change the deserialized type to an array or a type that implements a collection interface (e.g. ICollection, IList) like List that can be deserialized from a JSON array. JsonArrayAttribute can also be added to the type to force it to deserialize from a JSON array.
Path 'segments', line 1, position 13.

Expected result was like this on the brevo api website:

{
"segments": [
{
"id": 1,
"segmentName": "Segment_Jugend",
"categoryName": "My segments",
"updatedAt": "2024-08-02T12:40:10.670Z"
}
],
"count": 1
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant