Courier is a modern data interchange system for web + mobile stacks that combines an expressive schema language with language idiomatic data binding generators.


Why Courier?

Courier is the only comprehensive, schema based data system centered around JSON. Binary protocols, such as Protobuf and Thrift have proven that data schemas are an excellent way to share the structure of data messaged between multiple systems and programming languages. For JSON, however, there are few systems that take a schema driven approach and none that provide satisfactory type systems. Courier's solves this problem, providing a type safe, schema driven way of sharing JSON data between backends, web and mobile.



Courier Schema
record Fortune {
  message: String
  createdAt: DateTime
}
JSON
{
  "message": "Today's your lucky day!",
  "createdAt": "2016-02-08T16:22:33Z"
}
Scala
val fortune = Fortune(
  message = "Today's your lucky day!",
  createdAt = DateTime.now())
Swift
let fortune = Fortune(
  message: "Today's your lucky day!",
  createdAt:
    NSDate(timeIntervalSinceNow: 0))

Courier Features


Build for JSON.. and Binary

Courier serializes to natural looking JSON but also supports multiple binary data protocols including Avro, PSON and BSON.

Modern Schema language

Courier is a concise but comprehensive schema language, based on Pegasus and Avro, and with language features from Scala, Swift, and Avro IDL.

Language interoperability

Full support for Scala, Java, Swift and Javascript

Courier schemas enable languages to easily share the structure of the data they read and write, and Courier's data binding code generators eliminate the tedious and error prone process of manually writing serializers.


Full IDE Support

Courier has a full featured IntelliJ plugin that includes syntax highlighting, syntax error indication, code formatting, auto-import and auto-complete.

Idiomatic Data Bindings

Courier generates language idiomatic data bindings that look and feel natural to developers.

For instance, the Scala generator produces code with case classes, Options, default parameters, pattern matching, sealed traits and Scala collections.

Fast and stable

Courier is built on Pegasus, an efficient JVM data system that is in large scale production use at Linkedin and Coursera.







Community

Discussion Group

License

Courier is Apache 2.0 Licensed.

Contributing

See CONTRIBUTING.md.