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

Lexicon parser and schema model types for AT Protocol lexicon documents.

poptart_lexicon #

Parser and schema model types for AT Protocol Lexicon documents.

import 'package:poptart_lexicon/poptart_lexicon.dart';

void main() {
  final doc = LexiconDoc.fromJson({
    'lexicon': 1,
    'id': 'app.bsky.feed.like',
    'defs': {
      'main': {
        'type': 'record',
        'key': 'tid',
        'record': {
          'type': 'object',
          'required': ['subject', 'createdAt'],
          'properties': {
            'subject': {'type': 'ref', 'ref': 'com.atproto.repo.strongRef'},
            'createdAt': {'type': 'string', 'format': 'datetime'},
          },
        },
      },
    },
  });

  print(doc.id);
  print(doc.defs.keys);
}
0
likes
160
points
11
downloads

Documentation

Documentation
API reference

Publisher

verified publishersprk.so

Weekly Downloads

Lexicon parser and schema model types for AT Protocol lexicon documents.

Homepage
Repository (GitHub)
View/report issues
Contributing

Funding

Consider supporting this project:

github.com

License

BSD-3-Clause (license)

Dependencies

characters, freezed_annotation, json_annotation, poptart_primitives

More

Packages that depend on poptart_lexicon