Skip to content

richardsonnick/jerry

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

87 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Jerry

A fast, lightweight JSON parser written in modern C++.

Usage

#include "Json.h"
#include <iostream>
#include <unordered_map>
#include <string>

int main() {
  std::string input = "\"hello world\" : \"how are you?\"";
  std::unordered_map<std::string, json> result = Json::fromString(input);

  // Print the parsed JSON key-value pairs
  for (const auto& [key, value] : result) {
    std::cout << key << " : " << value << std::endl;
  }
  return 0;
}

This will output:

hello world : how are you?

Currently broken features:

  • doubles currently have rounding errors
  • No unicode support (i.e. "\u263A")
  • No support for quotation escape sequences (i.e. \")

Building

# Clone the repository
git clone https://github.com/NickR23/jerry.git
cd jerry

# Create a build directory
mkdir build && cd build

# Configure and build
cmake ..
make

# Run tests
ctest

Jerry JSON Parser
Literally jerry rn

About

A json parser in c++

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published