toon_format 0.1.0 copy "toon_format: ^0.1.0" to clipboard
toon_format: ^0.1.0 copied to clipboard

Token-Oriented Object Notation (TOON) - a token-efficient JSON alternative for LLM prompts

example/example.dart

import 'package:toon_format/toon_format.dart';

void main() {
  // Example usage (not yet implemented)

  try {
    final data = {
      'users': [
        {'id': 1, 'name': 'Alice', 'role': 'admin'},
        {'id': 2, 'name': 'Bob', 'role': 'user'}
      ]
    };

    // This will throw UnimplementedError
    final toon = encode(data);
    print(toon);
  } catch (e) {
    print('Encoding not yet implemented: $e');
  }
}
3
likes
160
points
45
downloads

Publisher

unverified uploader

Weekly Downloads

Token-Oriented Object Notation (TOON) - a token-efficient JSON alternative for LLM prompts

Homepage
Repository (GitHub)
View/report issues
Contributing

Documentation

Documentation
API reference

License

MIT (license)

More

Packages that depend on toon_format