json_java_converter 0.3.2

  • README.md
  • CHANGELOG.md
  • Installing
  • Versions
  • 0

JsonJavaConverter

A library for converting between Dart types and Java types, using JSON serilaization

Usage

A simple example, with one serializable entity (Note that any property ) you want to process must be annotated with Remote(), and any class with RemoteClass() and the Java class name.

season.dart:

import 'package:json_java_converter/json_java_converter.dart';

@RemoteClass("com.maths22.ftc.entities.Season")
class Season {
  @Remote()
  String id;

  @Remote()
  String name;

  @Remote()
  String slug;

  @Remote()
  String year;
}

To initialize the converters, you must call registerJsonConverters() in the main method of your application (typically in web/main.dart).

Add json_java_converter to the list of transformers in your pubspec.yaml.

Usage of converter:

converter = new RpcConverter();
converter.convertToJson(a); //Produces list/map/native type
converter.convertFromJson(response); //Produces Dart object

Changelog

0.3.0

  • Added Enum support

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  json_java_converter: ^0.3.2

2. Install it

You can install packages from the command line:

with pub:


$ pub get

Alternatively, your editor might support pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:json_java_converter/json_java_converter.dart';
  
Version Uploaded Documentation Archive
0.3.2 Sep 14, 2016 Go to the documentation of json_java_converter 0.3.2 Download json_java_converter 0.3.2 archive
0.3.1 Sep 14, 2016 Go to the documentation of json_java_converter 0.3.1 Download json_java_converter 0.3.1 archive
0.3.0+2 Sep 14, 2016 Go to the documentation of json_java_converter 0.3.0+2 Download json_java_converter 0.3.0+2 archive
0.3.0+1 Sep 13, 2016 Go to the documentation of json_java_converter 0.3.0+1 Download json_java_converter 0.3.0+1 archive
0.3.0 Sep 13, 2016 Go to the documentation of json_java_converter 0.3.0 Download json_java_converter 0.3.0 archive
0.2.1 Sep 4, 2016 Go to the documentation of json_java_converter 0.2.1 Download json_java_converter 0.2.1 archive
0.2.0 Aug 28, 2016 Go to the documentation of json_java_converter 0.2.0 Download json_java_converter 0.2.0 archive
0.1.0 Aug 9, 2016 Go to the documentation of json_java_converter 0.1.0 Download json_java_converter 0.1.0 archive
0.0.1 Aug 9, 2016 Go to the documentation of json_java_converter 0.0.1 Download json_java_converter 0.0.1 archive
Popularity:
Describes how popular the package is relative to other packages. [more]
0
Health:
Code health derived from static analysis. [more]
0
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
0
Overall:
Weighted score of the above. [more]
0
Learn more about scoring.

The package version is not analyzed, because it does not support Dart 2. Until this is resolved, the package will receive a health and maintenance score of 0.

Analysis issues and suggestions

Support Dart 2 in pubspec.yaml.

The SDK constraint in pubspec.yaml doesn't allow the Dart 2.0.0 release. For information about upgrading it to be Dart 2 compatible, please see https://www.dartlang.org/dart-2#migration.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=1.0.0 <2.0.0