https://github.com/glebbatykov/jard
Package for json encode and decode.
https://github.com/glebbatykov/jard
Last synced: 4 months ago
JSON representation
Package for json encode and decode.
- Host: GitHub
- URL: https://github.com/glebbatykov/jard
- Owner: GlebBatykov
- License: mit
- Created: 2023-03-03T22:14:23.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-05-11T23:01:20.000Z (about 2 years ago)
- Last Synced: 2025-02-11T13:47:56.372Z (4 months ago)
- Language: Dart
- Homepage:
- Size: 322 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://pub.dev/packages/jard)
**Languages:**
[](README.md)
[](README.ru.md)- [Using](#using)
- [Encode](#encode)
- [Decode](#decode)
- [Performance](#performance)
- [Encode perfomance](#encode-perfomance)# Using
This package is used for encoding and decoding JSON.
At the moment, encoding has been implemented, faster than using `jsonEncode` from dart:convert.
## Encode
Encoding is available using the static `encode` method of the `Jard` class.
Usage example:
```dart
import 'package:jard/jard.dart';void main() {
final map = {
'name': 'Alex',
'age': 22,
};final json = Jard.encode(map);
print(json);
}
```Expected output:
```dart
{"name":"Alex","age":22}
```## Decode
Under development.
# Performance
## Encode perfomance
Execution time (microseconds) benchmark in JIT:
Execution time (microseconds) benchmark in AOT:
Memory costs do not differ, they are at the level of 1% error in various tests in the direction of Jard or dart:convert.