Skip to content

fix: parse single-string JSON response (#2509)#2510

Open
IKBASYSTEMS wants to merge 1 commit intocfug:mainfrom
IKBASYSTEMS:main
Open

fix: parse single-string JSON response (#2509)#2510
IKBASYSTEMS wants to merge 1 commit intocfug:mainfrom
IKBASYSTEMS:main

Conversation

@IKBASYSTEMS
Copy link
Copy Markdown

Fixes #2509.

ResponseType.json with a single JSON string value (e.g. "ok") was not parsed correctly.
This updates parsing in dio_mixin and adds regression tests in options_test.dart (with adapter support in test/mock/adapters.dart).

Checklist:
✅ tests added
✅ branch up to date (you are)
✅ run tests first, then mark done

@IKBASYSTEMS IKBASYSTEMS requested a review from a team as a code owner April 22, 2026 09:05
Copy link
Copy Markdown
Member

@AlexV525 AlexV525 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The issue is missing a specific repro path thus the fix is also invalid at this moment. We have multiple options and checks that guard JSON parses.

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

Successfully merging this pull request may close these issues.

When single string json response received it doesn't parse it.

2 participants