https://github.com/landamessenger/object
Simplify the process of converting Dart objects to JSON and vice versa, making it easier to work with JSON data in Dart applications.
https://github.com/landamessenger/object
class dart flutter instance json serialization
Last synced: 4 months ago
JSON representation
Simplify the process of converting Dart objects to JSON and vice versa, making it easier to work with JSON data in Dart applications.
- Host: GitHub
- URL: https://github.com/landamessenger/object
- Owner: landamessenger
- License: mit
- Created: 2024-01-24T23:10:15.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2024-10-06T18:44:07.000Z (9 months ago)
- Last Synced: 2025-01-16T07:56:09.353Z (6 months ago)
- Topics: class, dart, flutter, instance, json, serialization
- Language: Dart
- Homepage: https://pub.dev/packages/object
- Size: 320 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# Object
[](https://pub.dev/packages/object)
[](https://travis-ci.org/landamessenger/object)
[](https://coveralls.io/github/landamessenger/object?branch=master)The `object` library provides utilities for serializing and deserializing Dart objects to and from JSON format. This library simplifies the process of converting Dart objects to JSON and vice versa, making it easier to work with JSON data in Dart applications.
## Features
- Automatic generation of serialization code for Dart classes using annotations.
- Support for serializing and deserializing JSON data with minimal boilerplate code.
- Customizable serialization behavior through annotations and configuration options.
- Compatibility with popular Dart frameworks and tools, including Flutter.Working with instances never was easiest.
```dart
SimpleSample? sample = {
'id': 'id',
'numberContent': 1,
'integerContent': 2,
'doubleContent': 3.0,
'stringContent': 'string',
'booleanContent': true,
}.asNullableInstance();
```### [Home](https://github.com/landamessenger/object/wiki)
### [Installation](https://github.com/landamessenger/object/wiki/Installation)
### [Classes](https://github.com/landamessenger/object/wiki/Classes)
[- Generate Serialization Code](https://github.com/landamessenger/object/wiki/Classes#generate-serialization-code)
### [Field Annotation](https://github.com/landamessenger/object/wiki/Field-Annotation)
### [Instances](https://github.com/landamessenger/object/wiki/Instances)
[- Create new instances](https://github.com/landamessenger/object/wiki/Instances#create-new-instances)
[- Create a list of instances](https://github.com/landamessenger/object/wiki/Instances#create-a-list-of-instances)
[- Create a map of instances](https://github.com/landamessenger/object/wiki/Instances#create-a-map-of-instances)
[- Other types of instances](https://github.com/landamessenger/object/wiki/Instances#other-types-of-instances)
[- Conversion safety](https://github.com/landamessenger/object/wiki/Instances#conversion-safety)