Skip to content

IbrahimShamma99/tatum

Repository files navigation

JSON Parsing toolchain

Fun Project in the creation aims to create JSON AST for formatting, predict how TS interface would look like and much more

Inspired by TS Service

Usage

Example of usage:

const source =
  '{"name": "John Doe", "age": 16, "isStudent": true , "gradDate": null}'
const scanner = new Scanner(source)
scanner.scan()
const parser = new Parser(scanner.tokens)
parser.parse()

const type = new TSVisitor().execute(parser.tree)

// type = 'interface {name: string, age: number, isStudent: boolean, gradDate: null}'

TODO

Typescript Visitor

  • Create a scanner
  • Create a parser
  • Create a visitor
  • Accept inner objects
  • Scan arrays
  • Parse arrays
  • Accept Arrays

JSON Formatter

  • Visitor Setup

About

JSON Parsing toolchain

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages