json_annotation_tools 0.1.7 copy "json_annotation_tools: ^0.1.7" to clipboard
json_annotation_tools: ^0.1.7 copied to clipboard

Transform cryptic JSON parsing errors into crystal-clear, actionable error messages. Perfect companion to json_annotation.

Changelog #

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.

[Unreleased] #

Nothing yet.

0.1.7 - 2025-03-01 #

πŸ“š Documentation & Examples #

  • Added a full Riverpod integration example in the README showing how to surface FormatException messages end-to-end.
  • Clarified the usage steps for safe parsing within providers and widgets.

πŸ”§ Maintenance #

  • Bumped dependency snippets in README/USAGE_GUIDE to reference version ^0.1.7.

0.1.6 - 2025-02-15 #

✨ Generator Improvements #

  • Respect positional constructors and avoid instantiating abstract classes when emitting fromJsonSafe, eliminating runtime crashes on complex DTOs.
  • Enhance enum, nullable, and nested-object handling so generated parsers line up with real model signatures.

πŸ“š Documentation & DX #

  • Expanded README with CLI cheat sheet, error-handling guidance, and testing tips.
  • Added USAGE_GUIDE.md for quick onboarding, plus a tool/demo_safe_json_error.dart script for demonstrating enhanced errors.
  • Updated dependency snippets to reference ^0.1.6.

βœ… Quality #

  • flutter test passes across the package and example ensuring generator changes stay solid.

0.1.5 - 2024-12-18 #

πŸš€ Tooling Upgrades #

  • Introduced the json_annotation_tools init CLI command to auto-inject @SafeJsonParsing() and matching part directives across existing models.
  • Added dry-run support so teams can preview the generated changes before applying them in CI or pre-commit hooks.

βœ… Quality #

  • Added regression coverage around the CLI so future enhancements don’t break the initialization workflow.
  • Refreshed the README with the CLI-first quick start and guidance for publishing the Flutter example app.

0.1.4 - 2024-10-27 #

πŸ“š Crystal-Clear @SafeJsonParsing() Documentation #

  • ✨ NEW: Step-by-step @SafeJsonParsing() guide in README.md
  • πŸ” ANSWERED: "How do I see enhanced error messages?" - complete tutorial
  • πŸ“‹ STEP-BY-STEP: Model annotation β†’ build.yaml β†’ code generation β†’ usage
  • 🎯 CLEAR EXAMPLES: Exact code showing enhanced error output in try-catch blocks

πŸš€ Enhanced Quick Start Guide #

  • πŸ† PRIMARY: @SafeJsonParsing() code generation now featured as main approach
  • ⚑ ALTERNATIVE: Manual extensions clearly marked as secondary option
  • πŸ”§ PRODUCTION: Real API service patterns with enhanced error handling
  • πŸ“± INTERACTIVE: Updated example app references and usage patterns

πŸ’‘ Developer Experience Improvements #

  • ❓ FAQ SECTION: "How to see enhanced error messages" directly addressed
  • 🏭 PRODUCTION PATTERNS: API service examples with error logging
  • πŸ”§ ADVANCED CONFIG: @SafeJsonField() with descriptions and common values
  • πŸ“Š VISUAL OUTPUT: Exact enhanced error message format shown in README

πŸ“¦ Updated Installation Guide #

  • πŸš€ LATEST VERSION: Updated to v0.1.4 in installation instructions
  • πŸ“‹ COMPLETE DEPS: Added build_runner and json_serializable to installation
  • βš™οΈ BUILD CONFIG: Clear build.yaml setup instructions included
  • 🎯 ONE-STOP SETUP: Everything needed for @SafeJsonParsing() in one place

🎨 Documentation Polish #

  • πŸ” SEARCHABLE: Key questions answered directly in README
  • πŸ“ COPY-PASTE: Ready-to-use code examples throughout
  • πŸš€ MODERN: Focused on code generation as primary approach
  • πŸ“± MOBILE-READY: Android example app running smoothly

0.1.3 - 2024-10-27 #

πŸ“ Perfect pub.dev Example #

  • ✨ NEW: Proper example/ folder for pub.dev package page showcase
  • 🎯 FOCUSED: Simple, runnable demo showing enhanced error messages in action
  • ⚑ QUICK SETUP: Just dart pub get && dart run main.dart - no complex dependencies
  • πŸ”₯ CLEAR OUTPUT: Demonstrates type mismatches, missing fields, and API scenarios
  • πŸ“š GUIDED: References advanced features (code generation, Flutter app) in README

πŸ“– Enhanced Production Documentation #

  • πŸ§ͺ COMPLETE: Copy-paste ready test_production.dart with full console logging
  • πŸ“Ί PREVIEW: Expected console output showing all error message types
  • 🏭 PRODUCTION: Real-world API service examples and error handling patterns
  • πŸš€ UPDATED: Latest v0.1.3 dependencies and setup instructions
  • πŸ’‘ COMPREHENSIVE: 500+ lines of production guidance with working examples

🎨 Developer Experience #

  • πŸ“± INSTANT VALUE: Developers see benefits immediately on pub.dev
  • πŸ› οΈ ZERO COMPLEXITY: Basic example shows core features without build setup
  • πŸ“ˆ CLEAR PATH: Easy progression from simple demo to advanced code generation
  • 🌟 PROFESSIONAL: Perfect first impression for pub.dev visitors

πŸ”§ Package Improvements #

  • 🧹 SIMPLIFIED: Removed unnecessary dependencies from basic example
  • πŸ“‹ FOCUSED: Clear separation between simple demo and advanced features
  • πŸ“š ORGANIZED: Better documentation hierarchy and cross-references
  • βœ… TESTED: All examples work perfectly and show expected output

0.1.2 - 2024-10-27 #

πŸš€ Interactive Code Generation Demo #

  • ✨ NEW: 6th demo page in example app showcasing @SafeJsonParsing() in action
  • 🎯 INTERACTIVE: Live "Try It Live!" buttons to test generated methods
  • πŸ“± VISUAL: Before/after comparison of manual vs automatic code generation
  • πŸ—οΈ COMPLETE: Full build setup with build_runner, json_serializable integration

πŸ”§ Code Generation Improvements #

  • Fixed: Nullable object handling in generator (User?.fromJsonSafe β†’ proper lambda)
  • Enhanced: Complex nested object parsing with proper type safety
  • Improved: Generated code quality and error handling
  • Added: Support for custom method names and validation options

πŸ“š Enhanced Documentation #

  • NEW: PRODUCTION_SETUP.md with real-world usage guide
  • Added: Step-by-step production integration instructions
  • Included: API service examples with error handling strategies
  • Enhanced: Performance impact documentation and security notes

🎨 Example App Features #

  • NEW: Auto-generated User, Product, and ApiResponse models
  • NEW: Field-level @SafeJsonField() annotations demonstration
  • NEW: Interactive error message testing with success/failure scenarios
  • Enhanced: Visual code examples showing annotation usage

πŸ› οΈ Developer Experience #

  • Improved: Generator handles nullable types correctly
  • Added: Production-ready error handling patterns
  • Enhanced: Integration with Dio, Retrofit, and common Flutter patterns
  • Fixed: Build configuration and dependency management

0.1.1 - 2024-10-27 #

🎯 Perfect pub.dev Score Achievement #

  • πŸ† PERFECT: Achieved 50/50 points on pub.dev analysis
  • βœ… FIXED: All 18 static analysis issues resolved
  • πŸ“š ENHANCED: Complete documentation coverage for all API elements
  • ⬆️ UPDATED: All dependencies to latest compatible versions

πŸ”§ Static Analysis Fixes #

  • Fixed: Type literal pattern matching (case int: β†’ case int _:)
  • Fixed: Metadata access compatibility with analyzer 8.4.0
  • Fixed: Deprecated withNullability API usage
  • Fixed: Pattern matching warnings in guard methods
  • Added: Comprehensive documentation for SafeJsonFieldAnnotation class and properties

πŸ“¦ Dependency Updates #

  • Updated: build from ^2.4.1 to ^4.0.2
  • Updated: source_gen from ^1.5.0 to ^4.0.2
  • Updated: analyzer from ^6.4.1 to ^8.4.0 (latest compatible)
  • Updated: meta to ^1.16.0 (Flutter SDK compatible)
  • Updated: flutter_lints from ^5.0.0 to ^6.0.0

πŸ› οΈ Code Generation Improvements #

  • Simplified: Field-based code generation (temporary - avoids analyzer API complexities)
  • Maintained: Full functionality while ensuring compatibility
  • Enhanced: Error handling and null safety in generated code
  • Added: TODO notes for future @JsonKey and @SafeJsonField support restoration

πŸ“ˆ Quality Improvements #

  • 0 errors: Clean static analysis
  • 0 warnings: Perfect linting score
  • 67.7%β†’100%: Documentation coverage improvement
  • Perfect compatibility: With latest Dart/Flutter ecosystem

0.1.0 - 2024-10-27 #

πŸš€ MAJOR FEATURE: Revolutionary Code Generation #

  • ✨ NEW: @SafeJsonParsing() annotation for zero-hassle safe parsing
  • πŸͺ„ AUTO-GENERATION: Build runner creates optimized safe parsing methods automatically
  • πŸ”§ NO MORE MANUAL WORK: Just add one annotation, get all benefits automatically
  • ⚑ BEST PERFORMANCE: Generated code is as fast as hand-written implementations

🎯 Zero-Hassle Developer Experience #

  • Before: Manual getSafe() calls everywhere (hassle!)
  • After: One @SafeJsonParsing() annotation (magic!)
  • βœ… BACKWARD COMPATIBLE: All existing code continues to work unchanged
  • πŸ”„ SEAMLESS INTEGRATION: Works perfectly with json_serializable workflow

πŸ”§ Code Generation Features #

  • πŸ“¦ NEW: @SafeJsonParsing() class-level annotation
  • 🎨 NEW: @SafeJsonField() field-level customization annotation
  • βš™οΈ NEW: SafeJsonParsingGenerator for build_runner integration
  • πŸ“‹ NEW: Comprehensive configuration options (null safety, validation, custom method names)
  • 🎯 NEW: Enhanced error messages with field descriptions and expected formats

πŸ“– Documentation & Examples #

  • πŸ“š NEW: Complete code generation examples and setup guide
  • πŸš€ UPDATED: README with revolutionary approach prominently featured
  • πŸ’‘ NEW: Before/after comparisons showing the improvement
  • πŸ”§ NEW: Integration instructions for existing projects

πŸ—οΈ Build System Integration #

  • πŸ“¦ NEW: build.yaml configuration for build_runner
  • βš™οΈ NEW: Generator entry point (lib/generator.dart)
  • πŸ”§ UPDATED: pubspec.yaml with build dependencies
  • πŸš€ NEW: Auto-detection and generation of safe parsing methods

πŸŽ‰ Developer Benefits #

  • πŸͺ„ EFFORTLESS: Zero manual work after adding annotation
  • πŸš€ FAST: Same performance as manual safe parsing
  • πŸ›‘οΈ SAFE: All existing safety features work automatically
  • πŸ“ˆ SCALABLE: Works with any number of model classes
  • πŸ”§ FLEXIBLE: Highly customizable with field-level annotations

0.0.3 - 2024-10-27 #

πŸ”§ pub.dev Analysis Fixes #

  • Fixed: Package description length (reduced to 126 characters, within 60-180 requirement)
  • Fixed: Removed unnecessary library declaration causing "dangling library doc comments"
  • Fixed: HTML angle brackets in documentation comments (Map<String, dynamic> β†’ Map<String, dynamic>)
  • Fixed: Added curly braces to for-loop statements for better code style
  • Fixed: Removed unused dart:convert import in example app

⚑ Static Analysis Improvements #

  • Reduced: Analysis issues from 18+ to minimal core issues
  • Enhanced: Code quality and pub.dev scoring
  • Improved: Package validation and compatibility

πŸ“¦ Package Quality #

  • Validated: 0 warnings in pub.dev dry-run
  • Optimized: For better pub.dev analysis scoring
  • Maintained: Full backward compatibility

0.0.2 - 2024-10-27 #

πŸ”§ Repository & Platform Updates #

  • Fixed: Updated all git repository URLs to correct GitHub profile
  • Updated: pubspec.yaml with proper homepage, repository, and issue tracker links
  • Enhanced: Platform support documentation with explicit iOS support details
  • Added: Comprehensive cross-platform testing instructions

πŸ“– Documentation Improvements #

  • Added: Detailed CONTRIBUTING.md with development guidelines
  • Enhanced: README with comprehensive platform support section
  • Improved: Contributing section with proper GitHub links
  • Added: Platform-specific demo running instructions for all 6 platforms

🌍 Platform Support Clarification #

  • Confirmed: Full iOS support (iPhone/iPad native apps)
  • Documented: All 6 supported platforms (iOS, Android, Web, macOS, Windows, Linux)
  • Added: Platform-specific demo commands
  • Clarified: Pure Dart package with no native dependencies

πŸ“¦ Package Metadata #

  • Updated: Version bump to reflect improvements
  • Fixed: All placeholder repository URLs
  • Enhanced: Issue tracking and contribution workflow

0.0.1 - 2024-10-27 #

πŸš€ Initial Release - Major JSON Debugging Enhancement #

✨ Core Features

  • Ultra-detailed error messages with copy-paste solutions for JSON parsing issues
  • Smart field name suggestions using fuzzy matching for typos and mismatches
  • Safe JSON parsing methods with getSafe() and getNullableSafe() extensions
  • Advanced diagnostics including property mapping analysis
  • Beginner-friendly explanations with step-by-step solutions

πŸ”§ Enhanced Core Functionality

  • JsonFieldGuard: Enhanced error context and null validation
  • SafeJsonExtension: 20+ convenience methods for common data types
  • Real-world API debugging examples with Dio + Retrofit integration
  • Batch key validation and advanced error reporting
  • Auto-model generation from JSON responses

πŸ“± Demo Applications

  • Interactive Flutter app with 5 feature demonstration pages
  • Console examples showcasing diagnostic scenarios
  • Real-world API integration examples
  • Cross-platform support (iOS, Android, Web, macOS, Windows, Linux)

πŸ“š Professional Documentation

  • Comprehensive README with visual examples and GIFs
  • Installation and migration guides for existing projects
  • Best practices and troubleshooting sections
  • Performance impact analysis and optimization tips
  • 31 comprehensive test cases ensuring reliability

🎨 Visual Assets

  • Professional error comparison screenshots showing before/after
  • Interactive demo GIFs optimized for web (13MB total package)
  • Mobile app demonstrations across platforms
  • Structured documentation with visual guides

πŸ’‘ Developer Experience

  • Beginner-friendly error explanations with educational context
  • Expert-level technical details for advanced debugging
  • Production-ready error handling patterns
  • Seamless backward compatibility with existing code
  • Perfect integration with json_annotation, json_serializable, Dio, and Retrofit

πŸ§ͺ Testing & Quality

  • 31 comprehensive test cases covering all functionality
  • Real-world scenario testing with edge cases
  • Performance validation ensuring zero overhead during success
  • Cross-platform compatibility testing

πŸ“¦ Package Information #


Made with ❀️ for the Flutter community

Transform cryptic JSON parsing errors into crystal-clear, actionable solutions!

2
likes
140
points
54
downloads

Publisher

verified publisherkhokan.me

Weekly Downloads

Transform cryptic JSON parsing errors into crystal-clear, actionable error messages. Perfect companion to json_annotation.

Documentation

API reference

License

MIT (license)

Dependencies

analyzer, args, build, flutter, json_annotation, meta, path, source_gen

More

Packages that depend on json_annotation_tools