Skip to main content

Typed Simple Object Notation

Project description

TySON

Neil deGrasse Tyson

Neil deGrasse Tyson - an astrophysicist, planetary scientist, author, and science communicator.

Typed Simple Object Notation (TySON) is a text-based type-customizable data-serialization format. The key feature of this format is typing. Each value (primitive and container) contains a type, which can be mapped to a specific data structure during implementation. This expands the ways of processing and storing data.

Grammar

A TySON text is a sequence of tokens wrapped into a journal. There are 4 types of tokens: vector, map, modifier, and primitive

Journal

The journal is key/value pairs separated with commas or semicolons. Key is primitive, value could be any TySON token. A single colon comes after each key. Keys can be not unique.

k|foo|: v|bar|;
k|one|: abs(n|3.14|);
k|two|: l[n|1|, n|2|, n|3|];
k|three|: o{n|1|:s|uno|, n|2|:s|dos|};

Map

The map consists of a type and a pair of curly brackets surrounding zero or more key/value pairs. The type represented as strings, which consists of letters. Key is primitive, value could be any TySON token. A single colon comes after each key. Keys can be not unique.

o{n|1|:s|uno|, n|2|:s|dos|}

Vector

The vector consists of a type and a pair of square brackets surrounding zero or more values. The type represented as strings, which consists of letters. Value could be any TySON token.

l[n|1|, n|2|, n|3|]

Modifier

The modifier consist of type and a pair of round brackets surrounding a single value. The type represented as strings, which consists of letters. Value could be any TySON token.

abs(n|3.14|)

Primitive

Primitive consists of a type and is surrounded by vertical bars value. If the value is empty, vertical bars don't exist. If the type is empty, the value must be surrounded by bars. The type is a string of letters, value is any string.

Valid primitives

type|value|
type
|value|

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tyson-0.1.5.tar.gz (5.3 kB view hashes)

Uploaded Source

Built Distributions

tyson-0.1.5-pp37-pypy37_pp73-manylinux_2_5_x86_64.manylinux1_x86_64.whl (1.1 MB view hashes)

Uploaded PyPy manylinux: glibc 2.5+ x86-64

tyson-0.1.5-cp310-none-win_amd64.whl (167.8 kB view hashes)

Uploaded CPython 3.10 Windows x86-64

tyson-0.1.5-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.whl (1.1 MB view hashes)

Uploaded CPython 3.10 manylinux: glibc 2.5+ x86-64

tyson-0.1.5-cp310-cp310-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl (550.8 kB view hashes)

Uploaded CPython 3.10 macOS 10.9+ universal2 (ARM64, x86-64) macOS 10.9+ x86-64 macOS 11.0+ ARM64

tyson-0.1.5-cp39-none-win_amd64.whl (167.9 kB view hashes)

Uploaded CPython 3.9 Windows x86-64

tyson-0.1.5-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.whl (1.1 MB view hashes)

Uploaded CPython 3.9 manylinux: glibc 2.5+ x86-64

tyson-0.1.5-cp39-cp39-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl (551.1 kB view hashes)

Uploaded CPython 3.9 macOS 10.9+ universal2 (ARM64, x86-64) macOS 10.9+ x86-64 macOS 11.0+ ARM64

tyson-0.1.5-cp38-none-win_amd64.whl (168.3 kB view hashes)

Uploaded CPython 3.8 Windows x86-64

tyson-0.1.5-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.whl (1.1 MB view hashes)

Uploaded CPython 3.8 manylinux: glibc 2.5+ x86-64

tyson-0.1.5-cp38-cp38-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl (550.6 kB view hashes)

Uploaded CPython 3.8 macOS 10.9+ universal2 (ARM64, x86-64) macOS 10.9+ x86-64 macOS 11.0+ ARM64

tyson-0.1.5-cp37-none-win_amd64.whl (168.2 kB view hashes)

Uploaded CPython 3.7 Windows x86-64

tyson-0.1.5-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.whl (240.0 kB view hashes)

Uploaded CPython 3.7m manylinux: glibc 2.5+ x86-64

tyson-0.1.5-cp37-cp37m-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl (550.6 kB view hashes)

Uploaded CPython 3.7m macOS 10.9+ universal2 (ARM64, x86-64) macOS 10.9+ x86-64 macOS 11.0+ ARM64

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page