8000 GitHub - amutake/jype: Data Types for JSON
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

amutake/jype

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

72 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Jype - JSON Data Type Format

Jype is a format to represent data structure of JSON.

This repository contains some packages.

  • jype
    • jype parser and validator library
  • jype-html
    • HTML generator from jype files

Features

  • algebraic data types
  • polymorphic data types
  • simple validator

Installing

% for d in jype jype-html; do cd $d; cabal install; cd ../; done

Examples

(jype format)

user = {
  id: int
  name: string
  description: nullable[string]
  language: language
}

language = "en" | "ja" | "fr"

This means:

(json format)

{
  "id": 0,
  "name": "foobar",
  "description": null,
  "language": "ja"
}

Future Work

  • aeson の Value 型の値が、jype の値になっているかどうかチェックするもの
  • REST API のドキュメンテーションツール

About

Data Types for JSON

Resources

Stars

Watchers

Forks

Releases

No releases published
33E1

Packages

No packages published
0