mautic / mautic/api-library

Contact API Json deserialize issue

Open
#250 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
PHP
Stars
205
Forks
129
PR merge metrics
No merged PRs in 30d

Description

When there is no contacts found, it returns below json
{ "total": "0", "contacts": [] }

When record found, it returns
{ "total": "1", "contacts": { "1": { "isPublished": true, "dateAdded": "2021-05-01T09:37:07+00:00", "dateModified": "2021-05-06T13:22:35+00:00", .......... "id": 1, ] },

I have issue with deserialize "contacts": [] and "contacts": {} from same http request. For PHP it might be ok but with other language, it is having issue.


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the Contact API response serialization and compare the JSON produced when contacts is empty with the JSON produced when a record exists. Confirm the expected consistent shape for contacts, then add or update coverage for both responses so deserialization works across languages.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
api
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.