lon 1.0.1 copy "lon: ^1.0.1" to clipboard
lon: ^1.0.1 copied to clipboard

Compact, canonical, lossless JSON codec for AI-first data exchange with self-describing record tables.

example/lon_example.dart

import 'package:lon/lon.dart';

void main() {
  const json =
      '{"users":[{"id":1,"name":"Ada"},{"id":2,"name":"Bob"},{"id":3,"name":"Lin"}]}';

  final encoded = jsonToLon(json);
  final decodedJson = lonToJson(encoded);

  print(encoded);
  print(decodedJson);

  final value = lon.decode(encoded) as Map<String, Object?>;
  print(value['users']);
}
1
likes
160
points
111
downloads

Documentation

API reference

Publisher

verified publisherfluttercandies.com

Weekly Downloads

Compact, canonical, lossless JSON codec for AI-first data exchange with self-describing record tables.

Repository (GitHub)
View/report issues

Topics

#serialization #json #llm #ai #codec

License

BSD-3-Clause (license)

More

Packages that depend on lon