codec 0.2.0
codec: ^0.2.0 copied to clipboard
类型安全、可组合的 JSON 编解码库:失败抛结构化 CodecException 携带 $.path 路径定位(可选兼容 FormatException),支持嵌套对象、discriminated union、递归结构与多版本兼容。
Use this package as a library
Depend on it
Run this command:
With Dart:
$ dart pub add codecThis will add a line like this to your package's pubspec.yaml (and run an implicit dart pub get):
dependencies:
codec: ^0.2.0Alternatively, your editor might support dart pub get. Check the docs for your editor to learn more.
Import it
Now in your Dart code, you can use:
import 'package:codec/codec.dart';