p-hatan/ mirror

pub repository

mirror.p-hatan.ir

json_annotation

0.2.9

Classes and helper functions that support JSON code generation via the `json_serializable` package.

Download archive

Readme

Defines the annotations used by json_serializable to create code for JSON serialization and deserialization.

See the example to understand how to configure your package.

Features and bugs

Please file feature requests and bugs at the issue tracker.

Changelog

0.2.9

  • When FormatException is caught in "checked mode", use the message property when creating CheckedFromJsonException.

0.2.8

  • Added $checkKeys helper function and deprecated $checkAllowedKeys. Upgrading to the latest json_serializable and re-running your build will eliminate any @deprecated hints you see.

  • Added BadKeyException exception which is the abstract super class for MissingRequiredKeysException, UnrecognizedKeysException, and DisallowedNullValueException.

  • Added JsonKey.required field and an associated MissingRequiredKeysException that is thrown when required fields don't have corresponding keys in a source JSON map.

  • Added JsonKey.disallowNullValue field and an associated DisallowedNullValueException that is thrown when corresponding keys exist in a source JSON map, but their values are null.

  • Updated documentation of JsonSerializable.createToJson to include details of the new generate_to_json_function configuration option.

0.2.7+1

  • Small improvement to UnrecognizedKeysException.message output and documentation comments.

0.2.7

  • Added JsonSerializable.disallowUnrecognizedKeys.
    • Added a helper function to support this option. This function starts with a $ and should only be referenced by generated code. It is not meant for direct use.
    • Added UnrecognizedKeysException for reporting errors.

0.2.6

  • CheckedFromJsonException

    • Added a public constructor to support hand-written JSON decoding logic.
    • The message property is now String (instead of Object).
  • Added JsonKey.defaultValue.

  • Added helpers for deserialization of enum values. These functions starting with $ are referenced by generated code. They are not meant for direct use.

0.2.5

  • Added CheckedFromJsonException which is thrown by code generated when checked is enabled in json_serializable.

  • Added functions to support the checked generation option. These functions starting with $ are referenced by generated code. They are not meant for direct use.

0.2.4

  • Added fromJson and toJson fields to JsonKey class.

0.2.3

  • Added ignore field to JsonKey class annotation

0.2.2

  • Added a helper class – $JsonMapWrapper – and helper functions – $wrapMap, $wrapMapHandleNull, $wrapList, and $wrapListHandleNull – to support the useWrappers option added to JsonSerializableGenerator in v0.3.0 of package:json_serializable.

0.2.1

  • JsonSerializable class annotation
    • Added nullable field.
    • Fixed doc comment.

0.2.0

  • Moved annotation classes for JsonSerializable and JsonLiteral.

Installing

export PUB_HOSTED_URL=https://pub.mirror.p-hatan.ir
flutter pub add json_annotation
pubspec.yaml
name: json_annotation
version: 0.2.9
description: >-
  Classes and helper functions that support JSON code generation via the
  `json_serializable` package.
homepage: https://github.com/dart-lang/json_serializable
author: Dart Team <misc@dartlang.org>
environment:
  sdk: '>=2.0.0-dev.54.0 <2.0.0'

Version history

VersionPublishedArchiveSHA-256
0.2.02017-09-27T22:04:55.605010ZDownloadc8f180d981178010a75ab18dece552de7c790273e5ab627158c9344c01454b98
0.2.12017-11-02T23:27:45.242584ZDownload17fec4b0b6ed4209cbf4398281b63423b2d0401be839bef78e00a9b5a3bc12f7
0.2.22017-12-15T19:27:22.272400ZDownload697c97a01ba731817eee96c8ce1f2c6874d7b31e7270953e61bc9bb18630f514
0.2.32018-04-03T19:31:33.674146ZDownload27efb35da5a01da297114a6c993bb0ce76aa423b03e2ae2028d401f01d23e169
0.2.42018-05-10T14:56:41.447408ZDownload4b8497580b1de2738b8cd2d20156114f5e0f3741a72d6a578dfdea74ae5f5da3
0.2.52018-05-22T22:31:49.636696ZDownloadb3cb53184118c37739eff1cfa13d06e11fdbffc9e836d2e1a91230cbe60ad060
0.2.62018-05-30T18:12:46.767561ZDownload597b05398ea4335a0ecdec6a9ea410698a5dd2b68947e559b1654cab029c9006
0.2.72018-06-01T17:03:15.487988ZDownloadefec1c1144bb1684b4e46cbd3f055306944a94ea8f85a5cfdb4e87c2e25d80fa
0.2.7+12018-06-04T22:11:10.209680ZDownload34c5897646fef59451744d48435ddca5f024ac9d7c75434d66c24cfd87e8eb8e
0.2.82018-06-08T16:09:54.744202ZDownload2aea101d35285abd98c6eb94d0ff97ac643abbaca48b48060c8f96a8ceb68222
0.2.92018-06-21T21:07:50.786483ZDownloadea2c950dec483deb937bb3965112ec423cfd21b77142d5d964d956c00f60a7db
0.2.9+12018-07-20T20:37:18.469277ZDownload0c2cb472c95c01d22cf4545f35c1c17ce0225cc4b30dfea86b4437e13b8b4473
1.0.02018-07-24T21:44:44.221278ZDownloade82f8792ec628291e1ceeaaf9245cc32c15dbf99639184ea84aac02feb206ac8
1.1.02018-08-09T23:24:46.776839ZDownload9849d6fad7611e66be578295903aec03f8ae6d4b988bd063746d0f177ed14bd4
1.2.02018-09-18T18:15:09.120200ZDownload039cfc37996a9118a4e8eef0995e484aa8da82efb926d607702596406ee7d942
2.0.02018-10-23T21:06:36.909292ZDownload7ff791c96f3e5d52e922bbdfeff1eae27fe1c9f0b3c16e2fe5b7b587b58339c0
2.1.02019-04-01T21:15:26.656734ZDownloadf36b6238632915c043b552e437253398c7aa4c4ce69a091da40fa56e798344e6
2.2.02019-04-09T16:03:39.532856ZDownload26b62d56482c02d56896e3bc7e86f4c7370f28b1019eba150edca29783eac1c4
2.3.02019-05-09T21:25:45.463685ZDownloaddcba642d19c9d64eaf2a5aec662a54f92fbfbd4b798ce1b865fa8b1c31ff7502
2.4.02019-05-16T21:44:15.730409ZDownload70fbd227bef9d0b7a9e2a8ac0d7495d1b37a7b722c7da2733df7ee750a8024d8
3.0.02019-08-07T23:19:06.434454ZDownloadaa3539e5cf10ae998869046e586438bcdd3efc1c8b49dd7381f984e387b256fc
3.0.12019-12-23T19:05:55.907126ZDownloadd3ba8a1b8dc542cbe97d0dc695e4bf25abc4d17a6110df4bb9713eb398f305f1
3.1.02020-09-22T22:50:33.743690ZDownloadc20d1d4d9a8dc77d5b0a2eec1b007cacbfd3b334b31acad5cc124d13055d44be
3.1.12020-11-20T19:46:35.534529ZDownload6cec7404b25d6338c8cb7b30131cd6c760079a4ec1fa7846c55bdda91f9d2819
4.0.0-nullsafety.02020-12-03T03:31:16.957273ZDownload400dfbcd1321acc502758c6df693765fd2b923586d939e40dc25a8befc2da07e
4.0.02021-02-11T23:35:05.016575ZDownload0aab0aad3dde662cdc02d3a6fa6c9f20687a91089900bd25c64f3badcc90bf21
4.0.12021-03-19T20:51:17.789341ZDownloadfd56fb29e3f02cd9bef80e99e9491d27889fb010f98ff3379b21e7d40d0112b3
4.1.02021-07-13T19:52:41.546817ZDownload0aa7409f6c82acfab96853b8b0c7503de49918cbe705a57cfdeb477756b4521b
4.2.02021-10-13T00:49:39.222906ZDownload858d1cfa5f09aeb5fae13244c98e4bc8db19bc517b1fc5ee32d4fd9188a5eb0d
4.3.02021-10-14T23:50:19.775657ZDownload3dd806caa7c7f7bb450099a5ece72ae1602cf6b6ed1f72d3d5205c8adbd70288
4.4.0-beta.02021-12-01T01:10:20.511865ZDownload4c8b1a66c0393bdbb757189a48551b9775045bc388b2cad2ea073f036976999f
4.4.02021-12-01T01:28:49.589832ZDownload2639efc0237c7b71c6584696c0847ea4e4733ddaf571ae9c79d5295e8ae17272
4.5.02022-04-27T00:42:54.990861ZDownload53cddd9d4a2d253d977dbbd21642f20f580a6a65fcc05d9d69b9f0ecc264cad9
4.6.02022-07-07T18:54:21.167085ZDownloadcb314f00b2488de7bc575207e54402cd2f92363f333a7933fd1b0631af226baa
4.7.02022-09-21T00:13:01.917768ZDownload3520fa844009431b5d4491a5a778603520cdc399ab3406332dcc50f93547258c
4.8.02023-01-19T20:14:57.945587ZDownloadc33da08e136c3df0190bd5bbe51ae1df4a7d96e7954d1d7249fea2968a72d317
4.8.12023-05-03T16:52:22.791042ZDownloadb10a7b2ff83d83c777edba3c6a0f97045ddadd56c944e1a23a3fdf43a1bf4467
4.9.02024-04-24T19:48:22.830950ZDownload1ce844379ca14835a50d2f019a3099f419082cfdd231cd86a142af94dd5c6bb1
4.10.02026-01-29T01:16:38.818956ZDownload805fa86df56383000f640384b282ce0cb8431f1a7a2396de92fb66186d8c57df
4.11.02026-02-19T19:05:57.491333ZDownloadcb09e7dac6210041fad964ed7fbee004f14258b4eca4040f72d1234062ace4c8
4.12.02026-05-15T18:27:32.045501ZDownload2a743920d81b7910627f68ee2c9ac1fc0bfee32b9fc3403587d7c6791ca12f80

Dependencies

No direct dependencies declared.