All Projects → nfrechette → sjson-cpp

nfrechette / sjson-cpp

Licence: MIT License
An Simplified JSON (SJSON) C++ reader and writer

Programming Languages

C++
36643 projects - #6 most used programming language
python
139335 projects - #7 most used programming language
CMake
9771 projects
shell
77523 projects

Projects that are alternatives of or similar to sjson-cpp

der-parser
BER/DER parser written in pure Rust. Fast, zero-copy, safe.
Stars: ✭ 73 (+356.25%)
Mutual labels:  parse
warframe-worldstate-parser
📗 An Open parser for Warframe's Worldstate in Javascript
Stars: ✭ 50 (+212.5%)
Mutual labels:  parse
exoffice
Library to parse common excel formats (xls, xlsx, csv)
Stars: ✭ 31 (+93.75%)
Mutual labels:  parse
Android-Shortify
An Android library used for making an Android application more faster with less amount of code. Shortify for Android provides basic functionalities of view and resource binding, view customization, JSON parsing, AJAX, various readymade dialogs and much more.
Stars: ✭ 21 (+31.25%)
Mutual labels:  parse
eval-estree-expression
Safely evaluate JavaScript (estree) expressions, sync and async.
Stars: ✭ 22 (+37.5%)
Mutual labels:  parse
expresol
Library for executing customizable script-languages in python
Stars: ✭ 11 (-31.25%)
Mutual labels:  parse
astutils
Bare essentials for building abstract syntax trees, and skeleton classes for PLY lexers and parsers.
Stars: ✭ 13 (-18.75%)
Mutual labels:  parse
desktop
Extendable calculator for the 21st Century ⚡
Stars: ✭ 85 (+431.25%)
Mutual labels:  parse
parse-cloud-class
Extendable way to set up Parse Cloud classes behaviour
Stars: ✭ 40 (+150%)
Mutual labels:  parse
erudite
A JavaScript equivalent to Literate CoffeeScript
Stars: ✭ 18 (+12.5%)
Mutual labels:  parse
vgprompter
C# library to parse a subset of Ren'Py script syntax
Stars: ✭ 17 (+6.25%)
Mutual labels:  parse
easy-json-parse
Parse your json safely and easily.
Stars: ✭ 33 (+106.25%)
Mutual labels:  parse
cmd-ts
💻 A type-driven command line argument parser
Stars: ✭ 92 (+475%)
Mutual labels:  parse
gitsum
parse and summarise git repository history
Stars: ✭ 43 (+168.75%)
Mutual labels:  parse
html-dom-parser
📝 HTML to DOM parser.
Stars: ✭ 56 (+250%)
Mutual labels:  parse
CROHME extractor
CROHME dataset extractor for OFFLINE-text-recognition task.
Stars: ✭ 77 (+381.25%)
Mutual labels:  parse
carsBase
База автомобилей с марками и моделями JSON, CSV, XLSX и MySQL
Stars: ✭ 49 (+206.25%)
Mutual labels:  parse
OpenGraph-Net
.Net Open Graph Parser written in C#
Stars: ✭ 111 (+593.75%)
Mutual labels:  parse
parse-torrent-file
DEPRECATED: Parse a .torrent file and return an object of keys/values
Stars: ✭ 62 (+287.5%)
Mutual labels:  parse
crawler CIA CREST
R-crawler for CIA website (CREST)
Stars: ✭ 15 (-6.25%)
Mutual labels:  parse

CLA assistant All Contributors Build status Build status Sonar Status GitHub (pre-)release GitHub license

sjson-cpp

sjson-cpp is a C++ library to read and write Simplified JSON files. It aims to be minimal, fast, and get out of the way of the programmer.

By design, the library does no memory allocations. This is in contrast to the nflibs C parser.

Everything is 100% C++11 header based for easy and trivial integration.

This parser is intended to accept only pure SJSON, and it will fail if given a JSON file, unlike the Autodesk JS Stingray parser.

The SJSON format

The data format is described here in the Stingray documentation.

TODO: Add a reference sjson file showing the format as a form of loose specification

Unicode support

UTF-8 support is as follow:

  • String values return a raw StringView into the SJSON buffer. It is the responsability of the caller to interpret it as ANSI or UTF-8.
  • String values properly support escaped unicode sequences in that they are returned raw in the StringView.
  • Keys do not support UTF-8, they must be ANSI.
  • The BOM is properly skipped if present

Unicode formats other than UTF-8 aren't supported.

Supported platforms

  • Windows VS2015 x86 and x64
  • Windows (VS2017, VS2019) x86, x64, and ARM64
  • Windows VS2019 with clang9 x86 and x64
  • Linux (gcc 5 to 10) x86 and x64
  • Linux (clang 4 to 11) x86 and x64
  • OS X (Xcode 10.3) x86 and x64
  • OS X (Xcode 11.7, 12.5, 13.2) x64 and ARM64
  • Android (NDK 21) ARMv7-A and ARM64
  • iOS (Xcode 10.3, 11.7, 12.5, 13.2) ARM64
  • Emscripten (1.39.11) WASM

The above supported platform list is only what is tested every release but if it compiles, it should run just fine.

External dependencies

There are none! You don't need anything else to get started: everything is self contained. See here for details.

Getting up and running

This library is 100% headers as such you just need to include them in your own project to start using it. However, if you wish to run the unit tests you will need a few things, see below.

Windows, Linux, and OS X for x86 and x64

  1. Install CMake 3.2 or higher (3.14 for Visual Studio 2019, or 3.10 on OS X with Xcode 10), Python 2.7 or 3, and the proper compiler for your platform.
  2. Execute git submodule update --init to get the files of external submodules (e.g. Catch2).
  3. Generate the IDE solution with: python make.py
    The solution is generated under ./build
  4. Build the IDE solution with: python make.py -build
  5. Run the unit tests with: python make.py -unit_test

Windows ARM64

For Windows on ARM64, the steps are identical to x86 and x64 but you will need CMake 3.13 or higher and you must provide the architecture on the command line: python make.py -compiler vs2017 -cpu arm64

Android

For Android, the steps are identical to Windows, Linux, and OS X but you also need to install Android NDK 21 (or higher). The build uses gradle and -unit_test will deploy and run on the device when executed (make sure that the adb executable is in your PATH for this to work).

Android Studio v3.5 can be used to launch and debug. After running CMake to build and generate everything, the Android Studio projects can be found under the ./build directory.

iOS

For iOS, the steps are identical to the other platforms but due to code signing, you will need to perform the builds from Xcode manually. Note that this is only an issue if you attempt to use the tools or run the unit tests locally.

Emscripten

Emscripten support currently only has been tested on OS X and Linux. To use it, make sure to install a recent version of Emscripten SDK 1.39.11+.

Commit message format

This library uses the angular.js message format and it is enforced with commit linting through every pull request.

Authors

License, copyright, and code of conduct

This project uses the MIT license.

Copyright (c) 2017 Nicholas Frechette, Cody Jones, and sjson-cpp contributors

Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.

Contributors

Thanks goes to these wonderful people (emoji key):


CodyDWJones

💻 🚧

Michał Janiszewski

💻 🚧

Martin Turcotte

🚧

Meradrin

🐛

This project follows the all-contributors specification. Contributions of any kind welcome!

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].