• Stars
    star
    59
  • Rank 509,601 (Top 11 %)
  • Language
    TypeScript
  • License
    MIT License
  • Created over 2 years ago
  • Updated 6 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

compile-time json-parser

jsonup jsonup

This is a zero dependency compile-time JSON parser written in TypeScript.

Usage

import { JSONUP, ObjectLike } from 'jsonup' // Node
import { JSONUP, ObjectLike } from 'https://esm.sh/jsonup' // Deno

const src = `{ "name": "jsonup" }`

type Str = typeof src      // Type: `'{ "name": "jsonup" }'`
type Obj = ObjectLike<Str> // Type: `{ name: string }`

/**
 * JSONUP.parse infers the type from a given object.
 * The type parameter is optional.
 */
// Type: `{ name: string }` the inferred record type
// Value: `{ name: "jsonup" }` the generated object
let obj = JSONUP.parse(src) 
let obj = JSONUP.parse<Obj>(src)

/**
 * JSONUP.stringify guarantees the semantic equality between 
 * the generated string and the given literal type. 
 * The type parameter is required (maybe).
 */
// Type: `'{ "name": "jsonup" }'` the given literal type
// Value: `'{ "name": "jsonup" }'` the generated string
const str = JSONUP.stringify<Str>(obj) 

Copyright and License

(c) 2022 TANIGUCHI Masaya. https://git.io/mit-license

More Repositories

1

vim-jetpack

The lightning-fast plugin manager, alternative to vim-plug
Vim Script
323
star
2

cheeriogs

Cheerio for Google Apps Script
JavaScript
293
star
3

dmacro.vim

Vim/ Neovim version of dmacro.el, which makes a key macro on-the-fly.
Lua
71
star
4

ddc-fuzzy

Fuzzy matcher, sorter, and conveter for ddc.vim
TypeScript
66
star
5

yomu

英和辞書付きPDF閲覧ソフト
JavaScript
48
star
6

vim-glance

Preview document wrtting in YOUR markdown and asciidoc, POD.
TypeScript
38
star
7

ts-match

A **true** pattern matching library for JavaScript/ TypeScript
TypeScript
31
star
8

papyrus

A Literate Programming Tool
Common Lisp
26
star
9

lib.deno.dev

TypeScript
26
star
10

cl-skkserv

Common LispによるSKK辞書サーバーとその拡張
Lex
22
star
11

vim-artemis

Compatibility layer for Vim/ Neovim configuration in Lua
Lua
21
star
12

markdown-it-mathjax3

Add Math to your Markdown with a MathJax plugin for Markdown-it
TypeScript
21
star
13

podium

The documentation tools from POD to Markdown/ HTML/ vimdoc/ LaTeX
Lua
19
star
14

hey.vim

hey.vim is a Vim plugin that utilizes the OpenAI API to edit text.
TypeScript
18
star
15

pkgbrew

non-root package manager based on pkgsrc
Shell
17
star
16

vim-typo

Vim-typo is an autocorrection plugin for Vim/Neovim that relies on a syntax file to provide intelligent corrections while typing.
Vim Script
16
star
17

hyper-tunnel

HTTPS tunnel over WSS
JavaScript
16
star
18

gas-minimal-boilerplate

A minimal boilerplate with webpack for Google Apps Script
JavaScript
15
star
19

ddc-path

Path completion for ddc.vim. This source collects path names with GNU find or sharkdp/fd.
TypeScript
15
star
20

cl-emoji

cl-emoji provides the Unicode emoji characters.
Common Lisp
14
star
21

UFO

Roswell Script Manager
Common Lisp
13
star
22

cl-pov

CommonLisp binding of the Persistence of Vision Raytracer, or POV-Ray.
Common Lisp
13
star
23

regex

regular expression engine for CommonLisp
Common Lisp
12
star
24

ddc-git

Git managed files completion for ddc.vim
TypeScript
10
star
25

unasync

Synchronously execute asynchronous functions on browsers, Node.js, and Deno
JavaScript
9
star
26

plog

A simple markdown based blog engine
PHP
6
star
27

prose-language-server

A Language server for LanguageTool and write-good
JavaScript
6
star
28

textlint-rule-spelling

A textlint rule for spellings of languages as much as possible
JavaScript
6
star
29

typography

Project logo generator
HTML
6
star
30

geo-mirror

This service redirects to the nearest mirror of given distribution
JavaScript
6
star
31

asciidoctor-wasm

TypeScript
6
star
32

textlint-rule-lsp

textlint rule for langauge server protocol
TypeScript
5
star
33

artistic-code-pro

Artistic Code Pro = Mgen+ + FiraCode + NerdFonts
Python
5
star
34

s2.js

LISP to JavaScript. Self-hosting.
JavaScript
5
star
35

wikibox

Modern and Simple CMS inspired by MDWiki
HTML
4
star
36

get-element-by

JavaScript like selector for cl-html-parse
Common Lisp
4
star
37

ddc-onp

DDC filters for An O(NP) Sequence Comparison Algorithm by Sun Wu, Udi Manber and Gene Myers.
TypeScript
4
star
38

trylisp

TypeScript
4
star
39

vim-pdfpreview

TypeScript
3
star
40

ob-acl2

Emacs Lisp
3
star
41

skkservd

skkserv in Deno
TypeScript
3
star
42

pickup.nvim

tani's fuzzy finder
Lua
3
star
43

bfjit

The esoteric programming language interpreter powered by TCC
Zig
3
star
44

acl2-kernel

Jupyter Kernel for ACL2
Jupyter Notebook
3
star
45

skk-jisyo-latex

SKK JISYO for LaTeX symbols
TypeScript
3
star
46

ddc-oldfiles

v:oldfiles completion for ddc.vim You can jump any files in history.
TypeScript
3
star
47

ctrlp-matchfzy

Fast CtrlP matcher using Lua matchfzy() as a replacement of mattn/ctrlp-matchuzzy.
Lua
3
star
48

shake

A simple task runner/ dependency resolver for JavaScript.
TypeScript
3
star
49

nix-common-lisp

Nix template for Common Lisp projects
Nix
2
star
50

scholar-plus

JavaScript
2
star
51

CSIL

LISP implemented in C++
C++
2
star
52

vip

VIP is a vim plugin manager
TypeScript
2
star
53

BISL

LISP on BEAM
Elixir
2
star
54

genei-fonts-mirror

The unofficial mirror of GenEi font families
2
star
55

rehype-template

JavaScript
2
star
56

rehype-inline-css

TypeScript
2
star
57

PDF.gs

extract text from PDF in Google Apps Script
JavaScript
2
star
58

tidy-tabs

JavaScript
2
star
59

unplugin-jsxify

import HTML/POD/Markdown/Asciidoc as JSX components
TypeScript
1
star
60

solv

IPC/CPC theorem prover in Prolog
Prolog
1
star
61

homebrew-linux

Experimental packages for homebrew/linuxbrew
Ruby
1
star
62

clj-imshow

A implementation of OpenCV's imshow
Clojure
1
star
63

hyper-everforest

JavaScript
1
star
64

docs

Vue
1
star
65

hyper-rigel

JavaScript
1
star
66

deno-template

ejs in sandbox
TypeScript
1
star
67

asciidoctor-shiki

JavaScript
1
star
68

markdown-it-pfm

JavaScript
1
star
69

tau

A trivial typed LISP
Racket
1
star
70

wasser

LISP ❤️ WebAssembly
1
star
71

wikir

to search and view wikipedia
HTML
1
star
72

qpdfgrep

Python
1
star
73

ruby-cont

Ruby
1
star