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

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

example/example.dart

import '../lib/toon_x_json.dart';
import 'json_formatter.dart';

void main() {
  // Example: Simple JSON with array of objects (tabular format)
  final data = {
    'users': [
      {'id': 1, 'name': 'Alice', 'role': 'admin'},
      {'id': 2, 'name': 'Bob', 'role': 'user'}
    ]
  };

  final toon = encode(data);
  print('=== Simple JSON Example ===');
  print(toon);
  print('');
  
  // Decode it back
  final decoded = decode(toon);
  print('Decoded JSON:');
  printJson(decoded);
}
4
likes
0
points
79
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

Documentation

Documentation

License

unknown (license)

More

Packages that depend on toon_x_json