diff --git a/example/lib/wrapper.dart b/example/lib/wrapper.dart index 14ae40e..d630ff5 100644 --- a/example/lib/wrapper.dart +++ b/example/lib/wrapper.dart @@ -1,5 +1,4 @@ import 'package:simple_json_example/test.dart'; -import 'package:simple_json_mapper/simple_json_mapper.dart'; // @JObj() class Wrapper { diff --git a/simple_json/pubspec.lock b/simple_json/pubspec.lock index d9518dc..d866cfc 100644 --- a/simple_json/pubspec.lock +++ b/simple_json/pubspec.lock @@ -7,28 +7,28 @@ packages: name: _fe_analyzer_shared url: "https://pub.dartlang.org" source: hosted - version: "18.0.0" + version: "22.0.0" analyzer: dependency: "direct main" description: name: analyzer url: "https://pub.dartlang.org" source: hosted - version: "1.2.0" + version: "1.7.1" args: dependency: transitive description: name: args url: "https://pub.dartlang.org" source: hosted - version: "2.0.0" + version: "2.1.1" async: dependency: transitive description: name: async url: "https://pub.dartlang.org" source: hosted - version: "2.5.0" + version: "2.7.0" boolean_selector: dependency: transitive description: @@ -42,63 +42,63 @@ packages: name: build url: "https://pub.dartlang.org" source: hosted - version: "2.0.0" + version: "2.0.2" build_config: dependency: transitive description: name: build_config url: "https://pub.dartlang.org" source: hosted - version: "0.4.7" + version: "1.0.0" build_daemon: dependency: transitive description: name: build_daemon url: "https://pub.dartlang.org" source: hosted - version: "2.1.10" + version: "3.0.0" build_resolvers: dependency: "direct main" description: name: build_resolvers url: "https://pub.dartlang.org" source: hosted - version: "2.0.0" + version: "2.0.3" build_runner: dependency: "direct dev" description: name: build_runner url: "https://pub.dartlang.org" source: hosted - version: "1.12.2" + version: "2.0.4" build_runner_core: dependency: transitive description: name: build_runner_core url: "https://pub.dartlang.org" source: hosted - version: "6.1.12" + version: "7.0.0" built_collection: dependency: transitive description: name: built_collection url: "https://pub.dartlang.org" source: hosted - version: "5.0.0" + version: "5.1.0" built_value: dependency: transitive description: name: built_value url: "https://pub.dartlang.org" source: hosted - version: "8.0.3" + version: "8.0.6" charcode: dependency: transitive description: name: charcode url: "https://pub.dartlang.org" source: hosted - version: "1.2.0" + version: "1.3.1" checked_yaml: dependency: transitive description: @@ -119,7 +119,7 @@ packages: name: code_builder url: "https://pub.dartlang.org" source: hosted - version: "3.7.0" + version: "4.0.0" collection: dependency: "direct main" description: @@ -140,28 +140,28 @@ packages: name: coverage url: "https://pub.dartlang.org" source: hosted - version: "1.0.2" + version: "1.0.3" crypto: dependency: transitive description: name: crypto url: "https://pub.dartlang.org" source: hosted - version: "3.0.0" + version: "3.0.1" dart_style: dependency: transitive description: name: dart_style url: "https://pub.dartlang.org" source: hosted - version: "2.0.0" + version: "2.0.1" file: dependency: transitive description: name: file url: "https://pub.dartlang.org" source: hosted - version: "6.1.0" + version: "6.1.2" fixnum: dependency: transitive description: @@ -169,27 +169,34 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "1.0.0" + frontend_server_client: + dependency: transitive + description: + name: frontend_server_client + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.0" glob: dependency: "direct main" description: name: glob url: "https://pub.dartlang.org" source: hosted - version: "2.0.0" + version: "2.0.1" graphs: dependency: transitive description: name: graphs url: "https://pub.dartlang.org" source: hosted - version: "1.0.0" + version: "2.0.0" http_multi_server: dependency: transitive description: name: http_multi_server url: "https://pub.dartlang.org" source: hosted - version: "3.0.0" + version: "3.0.1" http_parser: dependency: transitive description: @@ -224,7 +231,7 @@ packages: name: logging url: "https://pub.dartlang.org" source: hosted - version: "1.0.0" + version: "1.0.1" matcher: dependency: transitive description: @@ -252,7 +259,7 @@ packages: name: node_preamble url: "https://pub.dartlang.org" source: hosted - version: "2.0.0" + version: "2.0.1" package_config: dependency: transitive description: @@ -301,7 +308,7 @@ packages: name: shelf url: "https://pub.dartlang.org" source: hosted - version: "1.1.0" + version: "1.1.4" shelf_packages_handler: dependency: transitive description: @@ -326,9 +333,11 @@ packages: simple_json_mapper: dependency: "direct main" description: - name: simple_json_mapper - url: "https://pub.dartlang.org" - source: hosted + path: simple_json_mapper + ref: HEAD + resolved-ref: "49290a87e64c385ef71a972755614e3d9388f9c3" + url: "git://github.com/cocoatech/simple_json" + source: git version: "2.1.0" source_gen: dependency: "direct main" @@ -336,7 +345,7 @@ packages: name: source_gen url: "https://pub.dartlang.org" source: hosted - version: "1.0.0" + version: "1.0.2" source_map_stack_trace: dependency: transitive description: @@ -399,21 +408,21 @@ packages: name: test url: "https://pub.dartlang.org" source: hosted - version: "1.16.8" + version: "1.17.8" test_api: dependency: transitive description: name: test_api url: "https://pub.dartlang.org" source: hosted - version: "0.3.0" + version: "0.4.1" test_core: dependency: transitive description: name: test_core url: "https://pub.dartlang.org" source: hosted - version: "0.3.19" + version: "0.3.28" timing: dependency: transitive description: @@ -434,7 +443,7 @@ packages: name: vm_service url: "https://pub.dartlang.org" source: hosted - version: "6.1.0+1" + version: "7.1.0" watcher: dependency: transitive description: @@ -448,7 +457,7 @@ packages: name: web_socket_channel url: "https://pub.dartlang.org" source: hosted - version: "2.0.0" + version: "2.1.0" webkit_inspection_protocol: dependency: transitive description: diff --git a/simple_json/pubspec.yaml b/simple_json/pubspec.yaml index e40eb7d..27cc947 100644 --- a/simple_json/pubspec.yaml +++ b/simple_json/pubspec.yaml @@ -6,16 +6,21 @@ homepage: https://github.com/FlutterDevTools/simple_json/tree/master/simple_json environment: sdk: '>=2.12.0 <3.0.0' +publish_to: none + dependencies: - simple_json_mapper: ^2.1.0 - build_resolvers: ^2.0.0 - analyzer: ^1.2.0 - build: ^2.0.0 - source_gen: ^1.0.0 + simple_json_mapper: + git: + url: git://github.com/cocoatech/simple_json + path: simple_json_mapper + build_resolvers: ^2.0.3 + analyzer: ^1.7.1 + build: ^2.0.2 + source_gen: ^1.0.2 path: ^1.8.0 - glob: ^2.0.0 + glob: ^2.0.1 collection: ^1.15.0 dev_dependencies: - test: ^1.16.8 - build_runner: ^1.12.2 + test: ^1.17.8 + build_runner: ^2.0.4 diff --git a/simple_json_mapper/lib/src/annotations.dart b/simple_json_mapper/lib/src/annotations.dart index 003cabe..39bd1d7 100644 --- a/simple_json_mapper/lib/src/annotations.dart +++ b/simple_json_mapper/lib/src/annotations.dart @@ -10,7 +10,7 @@ class JProp extends JsonProperty { const JProp({ bool? ignore, String? name, - dynamic? defaultValue, + dynamic defaultValue, }) : super( ignore: ignore, name: name, @@ -26,7 +26,7 @@ class JsonProperty { }); final bool? ignore; final String? name; - final dynamic? defaultValue; + final dynamic defaultValue; } enum SerializationType { diff --git a/simple_json_mapper/lib/src/json_mapper.dart b/simple_json_mapper/lib/src/json_mapper.dart index f4ef438..dad8433 100644 --- a/simple_json_mapper/lib/src/json_mapper.dart +++ b/simple_json_mapper/lib/src/json_mapper.dart @@ -64,6 +64,8 @@ class CustomJsonMapper { final _toTypeConverterMap = { (DateTime).toString(): const DefaultISO8601DateConverter(), (Duration).toString(): const DefaultDurationConverter(), + 'DateTime?': const DefaultISO8601DateConverter(), + 'Duration?': const DefaultDurationConverter(), }; bool isMapperRegistered() { @@ -207,7 +209,7 @@ class CustomJsonMapper { : value; } - dynamic? applyDynamicFromInstanceConverter(TTo value, + dynamic applyDynamicFromInstanceConverter(TTo value, [JsonConverter? converter]) { return applyFromInstanceConverter(value, converter); } diff --git a/simple_json_mapper/pubspec.lock b/simple_json_mapper/pubspec.lock index 68be94e..7203b8e 100644 --- a/simple_json_mapper/pubspec.lock +++ b/simple_json_mapper/pubspec.lock @@ -7,28 +7,28 @@ packages: name: _fe_analyzer_shared url: "https://pub.dartlang.org" source: hosted - version: "18.0.0" + version: "22.0.0" analyzer: dependency: transitive description: name: analyzer url: "https://pub.dartlang.org" source: hosted - version: "1.2.0" + version: "1.7.0" args: dependency: transitive description: name: args url: "https://pub.dartlang.org" source: hosted - version: "2.0.0" + version: "2.1.1" async: dependency: transitive description: name: async url: "https://pub.dartlang.org" source: hosted - version: "2.5.0" + version: "2.7.0" boolean_selector: dependency: transitive description: @@ -42,7 +42,7 @@ packages: name: charcode url: "https://pub.dartlang.org" source: hosted - version: "1.2.0" + version: "1.3.1" cli_util: dependency: transitive description: @@ -70,35 +70,42 @@ packages: name: coverage url: "https://pub.dartlang.org" source: hosted - version: "1.0.2" + version: "1.0.3" crypto: dependency: transitive description: name: crypto url: "https://pub.dartlang.org" source: hosted - version: "3.0.0" + version: "3.0.1" file: dependency: transitive description: name: file url: "https://pub.dartlang.org" source: hosted - version: "6.1.0" + version: "6.1.2" + frontend_server_client: + dependency: transitive + description: + name: frontend_server_client + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.0" glob: dependency: transitive description: name: glob url: "https://pub.dartlang.org" source: hosted - version: "2.0.0" + version: "2.0.1" http_multi_server: dependency: transitive description: name: http_multi_server url: "https://pub.dartlang.org" source: hosted - version: "3.0.0" + version: "3.0.1" http_parser: dependency: transitive description: @@ -126,7 +133,7 @@ packages: name: logging url: "https://pub.dartlang.org" source: hosted - version: "1.0.0" + version: "1.0.1" matcher: dependency: transitive description: @@ -140,7 +147,7 @@ packages: name: meta url: "https://pub.dartlang.org" source: hosted - version: "1.3.0" + version: "1.4.0" mime: dependency: transitive description: @@ -154,7 +161,7 @@ packages: name: node_preamble url: "https://pub.dartlang.org" source: hosted - version: "2.0.0" + version: "2.0.1" package_config: dependency: transitive description: @@ -196,7 +203,7 @@ packages: name: shelf url: "https://pub.dartlang.org" source: hosted - version: "1.1.0" + version: "1.1.4" shelf_packages_handler: dependency: transitive description: @@ -273,21 +280,21 @@ packages: name: test url: "https://pub.dartlang.org" source: hosted - version: "1.16.8" + version: "1.17.8" test_api: dependency: transitive description: name: test_api url: "https://pub.dartlang.org" source: hosted - version: "0.3.0" + version: "0.4.1" test_core: dependency: transitive description: name: test_core url: "https://pub.dartlang.org" source: hosted - version: "0.3.19" + version: "0.3.28" typed_data: dependency: transitive description: @@ -301,7 +308,7 @@ packages: name: vm_service url: "https://pub.dartlang.org" source: hosted - version: "6.1.0+1" + version: "7.1.0" watcher: dependency: transitive description: @@ -315,7 +322,7 @@ packages: name: web_socket_channel url: "https://pub.dartlang.org" source: hosted - version: "2.0.0" + version: "2.1.0" webkit_inspection_protocol: dependency: transitive description: diff --git a/simple_json_mapper/pubspec.yaml b/simple_json_mapper/pubspec.yaml index 809681a..c9b2a39 100644 --- a/simple_json_mapper/pubspec.yaml +++ b/simple_json_mapper/pubspec.yaml @@ -10,4 +10,4 @@ environment: dev_dependencies: pedantic: ^1.11.0 - test: ^1.16.8 + test: ^1.17.8