jsonify 0.0.1 copy "jsonify: ^0.0.1" to clipboard
jsonify: ^0.0.1 copied to clipboard

outdatedDart 1 only

A library useful for objects to serialize it and make a json represention of it.

example/jsonify.dart

// Copyright (c) 2014, <your name>. All rights reserved. Use of this source code
// is governed by a BSD-style license that can be found in the LICENSE file.

library jsonify.example;

import 'package:jsonify/jsonify.dart';
import 'dart:convert';

class Book extends Object with Jsonify {
  
  @JsonProperty("author-name")
  String author;
  
  String title;
  
  @JsonIgnore()
  String isbn;
  
  Book(this.author, this.title, this.isbn);
}

main() {
  Book book = new Book("JK Rowling", "Harry Potter", "1232213343221");
  var jsonBook = JSON.encode(book);
  print('book: ${jsonBook}');
}
0
likes
0
pub points
0%
popularity

Publisher

unverified uploader

A library useful for objects to serialize it and make a json represention of it.

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

More

Packages that depend on jsonify