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

Fix bug in JSON type cast #19

Merged

Conversation

vominhmanh
Copy link
Contributor

@vominhmanh vominhmanh commented Apr 21, 2024

This exception occurs in type cast when casting json.

Unhandled Exception: type '_Map<Object?, Object?>' is not a subtype of type 'Map<String, dynamic>?'

🛠️ PR Summary

Made with ❤️ by Ultralytics Actions

🌟 Summary

Improved data parsing in the YOLO Flutter app for better performance and reliability.

📊 Key Changes

  • Simplified the process of converting JSON to ClassificationResult objects by directly casting JSON maps, removing intermediate steps.
  • Eliminated unnecessary null checks in the parsing logic to streamline code.

🎯 Purpose & Impact

  • Purpose: The main aim is to enhance the efficiency and accuracy of the data parsing from JSON to object models within the app. This is achieved by reducing the complexity of the conversion process and minimizing potential errors through direct casting.
  • Impact: Users can expect a more reliable and slightly faster app performance when it comes to displaying object detection results. This update paves the way for smoother app interactions and contributes to the overall robustness of the system. Developers will find the codebase cleaner and easier to maintain or extend. 🚀🔧

This exception occurs in type cast when casting json.

Unhandled Exception: type '_Map<Object?, Object?>' is not a subtype of type 'Map<String, dynamic>?'
Copy link

github-actions bot commented Apr 21, 2024

CLA Assistant Lite bot All Contributors have signed the CLA. ✅

@vominhmanh
Copy link
Contributor Author

I have read the CLA Document and I sign the CLA

@glenn-jocher glenn-jocher changed the title fix bug in type cast when casting json Fix bug in JSON type cast May 13, 2024
@glenn-jocher glenn-jocher merged commit 964cf01 into ultralytics:main May 13, 2024
2 checks passed
@glenn-jocher
Copy link
Member

@vominhmanh PR merged! Thank you for your contributions and please let us know if you spot any other issues :)

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.

2 participants