搜尋套件、儲存庫與 APP 分類

套件詳情v2.0.4

checked_yaml

使用 package:json_serializable 和 package:yaml 解碼 YAML 文件時產生更具幫助性的例外狀況。

AndroidiOSWebmacOSWindowsLinux
近 30 天下載
1220萬
喜歡數
35
Pub 分數
160

安裝套件

flutter pub add checked_yaml

套件介紹

根據套件公開資料產生的選型評估,僅供參考。

CheckedYAML 是一個 Dart 套件,可增強解碼 YAML 文件時的錯誤報告,特別是在與 json_serializable 一起使用時。它在 YAML 解析過程中提供更詳細且可操作的例外訊息,幫助開發者快速識別遺漏欄位、類型不符或無效值等問題。透過與現有的序列化工作流程無縫整合,它在不需要變更資料模型的情況下提升除錯效率。此套件在開發環境中尤為實用,清晰的回饋能加速故障排除。

適用情境

  • 除錯 YAML 解析錯誤
  • 改進序列化過程中的開發人員體驗
  • 增強CI/CD流水線中的錯誤訊息
  • 在執行時驗證設定檔
  • 在應用中支援結構化資料輸入
  • 與 json_serializable 工作流程整合

主要特色

  • 詳細異常訊息
  • 與 json_serializable 的無縫整合
  • 執行時驗證 YAML 結構
  • 改進的錯誤定位
  • 支援嵌套物件驗證
  • 缺少或錯誤欄位的明確指示

適合對象

  • 使用 json_serializable 的開發者
  • 使用 YAML 配置文件的團隊
  • 需要強大數據驗證的項目
  • 前端和後端應用程式處理 YAML
  • CI/CD流水線需要清晰的錯誤日誌
  • 具有複雜設定模式的應用程式

使用建議

  • 僅供非生產環境使用
  • 需要 json_serializable 才能生效
  • 可能略微增加建構複雜度
  • 限於 YAML 解析上下文
  • 不取代模式驗證工具
  • 最適合在開發和測試階段使用

原始 README

以下為關聯原始碼儲存庫的 README 原文快照,最新內容請造訪原始碼儲存庫。

Dart CI

Provides Dart Build System builders for handling JSON.

json_serializable Pub Package

The core package providing Generators for JSON-specific tasks.

Import it into your pubspec dev_dependencies: section.

json_annotation Pub Package

The annotation package which has no dependencies.

Import it into your pubspec dependencies: section.

checked_yaml Pub Package

Generate more helpful exceptions when decoding YAML documents using package:json_serializable and package:yaml.

Import it into your pubspec dependencies: section.

example

An example showing how to set up and use json_serializable and json_annotation.

所屬分類

依賴

依賴清單 3 項

原始碼儲存庫

使用此套件的專案