IOS>> jp>> 返回
项目作者: rbartlensky

项目描述 :
JSON parser
高级语言: C
项目地址: git://github.com/rbartlensky/jp.git
创建时间: 2020-07-19T22:46:44Z
项目社区:https://github.com/rbartlensky/jp

开源协议:

下载


jp — Json Parser

This is my attempt at creating a JSON validator in C.

Future work

  • Backtraces (why/where did it fail?):
    ** an initial version of this is now included
  • Better parsing (stop making use of recursive functions, better parsing
    techniques, etc.)

Why another validator?

Learn about parsing, and practice my C skills.

Why C?

I am writing a lot of Rust code, and I’ve always wanted to learn C. Might also
implement this in Rust and compare the two implementations performance wise.

How to build and run

  • Build: make
  • Run: ./jp -f /path/to/file.json

Input:

  1. {
  2. "dsa\u1233"
  3. :
  4. tru
  5. }

Output:

  1. 0: Failed to match value at line: 8, col: 4
  2. 1: Failed to match "true" at line: 8, col: 7