Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/oddbit/flutter-schema-org

JSON-LD library with Dart types for Schema.org vocabulary
https://github.com/oddbit/flutter-schema-org

dart flutter flutter-library flutter-package flutter-seo flutter-web schema-org seo

Last synced: 8 days ago
JSON representation

JSON-LD library with Dart types for Schema.org vocabulary

Awesome Lists containing this project

README

        

JSON-LD Dart classes for Schema.org vocabulary.

## Features

`schema_org` provides Dart definitions for Schema.org vocabulary that can
be exported to JSON-LD format. The typings are exposed as complete sets of
discriminated type unions, allowing for easy completions and stricter validation.

You can find all available schemas on [Schema.org](https://schema.org/docs/schemas.html)
and each schema is represented in this library with the prefix `Schema`

For example

- [Organization](https://schema.org/Organization) => `SchemaOrganization`
- [Person](https://schema.org/Person) => `SchemaPerson`

## Usage

Call the `SchemaOrg.writeJsonLd()` method and pass it a Schema.org class that
represents your data.

```flutter
SchemaOrg.writeJsonLd(
SchemaOrganization(
name: 'Oddbit',
url: 'https://oddbit.id',
logo: 'https://avatars.githubusercontent.com/u/1946799?s=200&v=4',
),
);
```

![Oddbit Organization Screenshot](https://raw.githubusercontent.com/oddbit/flutter-schema-org/main/images/oddbit_organization_html.png)

## Getting involved

First of all, thank you for even considering to get involved. You are a real
super :star: and we :heart: you!

All the schema definitions are auto generated by the schema_parser CLI script
that you can find in the repository folder
[`/parser`](https://github.com/oddbit/flutter-schema-org/tree/main/parser).

### Reporting bugs and issues

Validating all the schemas and possible quirks of how to interpret their usage is a
huge task and we appreciate any findings and links to sources or best practices that
can help us to improve this package.

We're grateful for any help that you can provide, and even better if you can provide
suggestions for how to improve the `schema_parser` script that generates all the code.