Skip to content

owtotwo/jsonat

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

97 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Jsonat - A JSON Library in C++

Copyright (c) 2016 sysu_AT <owtotwo@163.com>

Build Status

Introduction

  • Jsonat is a C++ library used to read and write JSON.

Sample

using jsonat::Json; // or jsonat::JSON
using jsonat::makeArray; // or Json::make_array;
using jsonat::makeObject; // or Json::make_object;

Json a; // NULL_TYPE
Json b = 15331120; // NUMBER_TYPE
Json c = 3.1415926; // NUMBER_TYPE
Json d = "hello"; // STRING_TYPE
Json e = true; // BOOLEAN_TYPE
Json f = {{"shape", "rectangle"}, {"length", 12}, {"width", c}}; // OBJECT_TYPE
Json g = {a, b, c, d, "Literal", e, f}; // ARRAY_TYPE

f["color"] = "red";
a["author"]["university"] = "SYSU";

Features

  • Concise implementation
  • JavaScript object-like
  • Simple API
  • More test relatively

Requirements

  • Platforms
  • Windows (x64)
  • Linux (ubuntu12.04)
  • Mac OS X
  • A C++11-Standard-Compliant Compiler
  • Additional Compile Flag
  • -std=c++11

How To Use

  • $> make
  • $> make test
  • $> make sample

Related Projects

License

About

jsonat is a C++ library used to read and write JSON.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages