dart_json_mapper_fixnum 1.1.4 copy "dart_json_mapper_fixnum: ^1.1.4" to clipboard
dart_json_mapper_fixnum: ^1.1.4 copied to clipboard

This is a dart-json-mapper complementary package provides support for https://pub.dev/packages/fixnum types in order to serialize / deserialize them from / to JSON.

pub package

This is a dart-json-mapper complementary package provides support for https://pub.dev/packages/fixnum types in order to serialize / deserialize them from / to JSON.

Basic setup #

Beforehand please consult with basic setup section from dart-json-mapper package.

Please add the following dependencies to your pubspec.yaml:

dependencies:
  dart_json_mapper:
  dart_json_mapper_fixnum:
dev_dependencies:
  build_runner:

Usage example lib/main.dart

import 'package:fixnum/fixnum.dart' show Int32;
import 'package:dart_json_mapper/dart_json_mapper.dart' show JsonMapper, jsonSerializable;
import 'package:dart_json_mapper_fixnum/dart_json_mapper_fixnum.dart' show fixnumAdapter;

import 'main.mapper.g.dart' show initializeJsonMapper;

@jsonSerializable
class FixnumClass {
  Int32 integer32;

  FixnumClass(this.integer32);
}

void main() {
  initializeJsonMapper(adapters: [fixnumAdapter]);

  print(JsonMapper.serialize(
     FixnumClass(Int32(1234567890))
  ));
}

output:

{
  "integer32": 1234567890
}
1
likes
130
points
106
downloads

Publisher

verified publisheredensapple.com

Weekly Downloads

This is a dart-json-mapper complementary package provides support for https://pub.dev/packages/fixnum types in order to serialize / deserialize them from / to JSON.

Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD-3-Clause (license)

Dependencies

dart_json_mapper, fixnum

More

Packages that depend on dart_json_mapper_fixnum