Project Name | Stars | Downloads | Repos Using This | Packages Using This | Most Recent Commit | Total Releases | Latest Release | Open Issues | License | Language |
---|---|---|---|---|---|---|---|---|---|---|
Flask_jsondash | 3,243 | a year ago | 11 | June 13, 2017 | 50 | mit | Python | |||
:snake: :bar_chart: :chart_with_upwards_trend: Build complex dashboards without any front-end code. Use your own endpoints. JSON config only. Ready to go. | ||||||||||
Yyjson | 2,602 | 6 days ago | 1 | July 19, 2023 | 6 | mit | C | |||
The fastest JSON library in C | ||||||||||
Just Dashboard | 1,489 | 3 | 3 | 2 years ago | 29 | July 13, 2019 | 49 | mit | JavaScript | |
:bar_chart: :clipboard: Dashboards using YAML or JSON files | ||||||||||
Angular Nvd3 | 1,323 | 198 | 13 | 4 years ago | 11 | August 17, 2016 | 414 | mit | JavaScript | |
AngularJS directive for NVD3 reusable charting library (based on D3). Easily customize your charts via JSON API. | ||||||||||
Jp | 1,123 | 5 years ago | 1 | March 03, 2021 | 8 | mit | Go | |||
dead simple terminal plots from JSON data. single binary, no dependencies. linux, osx, windows. | ||||||||||
Vscode Data Preview | 447 | 6 months ago | 54 | apache-2.0 | TypeScript | |||||
Data Preview 🈸 extension for importing 📤 viewing 🔎 slicing 🔪 dicing 🎲 charting 📊 & exporting 📥 large JSON array/config, YAML, Apache Arrow, Avro, Parquet & Excel data files | ||||||||||
Open_flash_chart | 267 | 12 years ago | 7 | mit | Ruby | |||||
The ruby on rails plugin for teethgrinder's Open Flash Chart (version 2) | ||||||||||
Jmh Visualizer | 255 | 2 months ago | 16 | agpl-3.0 | JavaScript | |||||
Visually explore your JMH Benchmarks | ||||||||||
Tradingview Data Scraper | 250 | 2 years ago | 11 | apache-2.0 | Python | |||||
Extract price and indicator data from TradingView charts to create ML datasets | ||||||||||
Plotly Scala | 212 | 4 | 4 months ago | 22 | August 11, 2022 | 45 | Scala | |||
Scala bindings for plotly.js |
A high performance JSON library written in ANSI C.
int64
, uint64
, and double
numbers.h
and one c
file.mutable copy
for modification.Benchmark project and dataset: yyjson_benchmark
The simdjson's new On Demand
API is faster if most JSON fields are known at compile-time.
This benchmark project only checks the DOM API, a new benchmark will be added later.
twitter.json | parse (GB/s) | stringify (GB/s) |
---|---|---|
yyjson(insitu) | 1.80 | 1.51 |
yyjson | 1.72 | 1.42 |
simdjson | 1.52 | 0.61 |
sajson | 1.16 | |
rapidjson(insitu) | 0.77 | |
rapidjson(utf8) | 0.26 | 0.39 |
cjson | 0.32 | 0.17 |
jansson | 0.05 | 0.11 |
twitter.json | parse (GB/s) | stringify (GB/s) |
---|---|---|
yyjson(insitu) | 3.51 | 2.41 |
yyjson | 2.39 | 2.01 |
simdjson | 2.19 | 0.80 |
sajson | 1.74 | |
rapidjson(insitu) | 0.75 | |
rapidjson(utf8) | 0.30 | 0.58 |
cjson | 0.48 | 0.33 |
jansson | 0.09 | 0.24 |
More benchmark reports with interactive charts (update 2020-12-12)
Platform | CPU | Compiler | OS | Report |
---|---|---|---|---|
Intel NUC 8i5 | Core i5-8259U | msvc 2019 | Windows 10 2004 | Charts |
Intel NUC 8i5 | Core i5-8259U | clang 10.0 | Ubuntu 20.04 | Charts |
Intel NUC 8i5 | Core i5-8259U | gcc 9.3 | Ubuntu 20.04 | Charts |
AWS EC2 c5a.large | AMD EPYC 7R32 | gcc 9.3 | Ubuntu 20.04 | Charts |
AWS EC2 t4g.medium | Graviton2 (ARM64) | gcc 9.3 | Ubuntu 20.04 | Charts |
Apple iPhone 12 Pro | A14 (ARM64) | clang 12.0 | iOS 14 | Charts |
const char *json = "{\"name\":\"Mash\",\"star\":4,\"hits\":[2,2,1,3]}";
// Read JSON and get root
yyjson_doc *doc = yyjson_read(json, strlen(json), 0);
yyjson_val *root = yyjson_doc_get_root(doc);
// Get root["name"]
yyjson_val *name = yyjson_obj_get(root, "name");
printf("name: %s\n", yyjson_get_str(name));
printf("name length:%d\n", (int)yyjson_get_len(name));
// Get root["star"]
yyjson_val *star = yyjson_obj_get(root, "star");
printf("star: %d\n", (int)yyjson_get_int(star));
// Get root["hits"], iterate over the array
yyjson_val *hits = yyjson_obj_get(root, "hits");
size_t idx, max;
yyjson_val *hit;
yyjson_arr_foreach(hits, idx, max, hit) {
printf("hit%d: %d\n", (int)idx, (int)yyjson_get_int(hit));
}
// Free the doc
yyjson_doc_free(doc);
// All functions accept NULL input, and return NULL on error.
// Create a mutable doc
yyjson_mut_doc *doc = yyjson_mut_doc_new(NULL);
yyjson_mut_val *root = yyjson_mut_obj(doc);
yyjson_mut_doc_set_root(doc, root);
// Set root["name"] and root["star"]
yyjson_mut_obj_add_str(doc, root, "name", "Mash");
yyjson_mut_obj_add_int(doc, root, "star", 4);
// Set root["hits"] with an array
int hits_arr[] = {2, 2, 1, 3};
yyjson_mut_val *hits = yyjson_mut_arr_with_sint32(doc, hits_arr, 4);
yyjson_mut_obj_add_val(doc, root, "hits", hits);
// To string, minified
const char *json = yyjson_mut_write(doc, 0, NULL);
if (json) {
printf("json: %s\n", json); // {"name":"Mash","star":4,"hits":[2,2,1,3]}
free((void *)json);
}
// Free the doc
yyjson_mut_doc_free(doc);
// Read JSON file, allowing comments and trailing commas
yyjson_read_flag flg = YYJSON_READ_ALLOW_COMMENTS | YYJSON_READ_ALLOW_TRAILING_COMMAS;
yyjson_read_err err;
yyjson_doc *doc = yyjson_read_file("/tmp/config.json", flg, NULL, &err);
// Iterate over the root object
if (doc) {
yyjson_val *obj = yyjson_doc_get_root(doc);
yyjson_obj_iter iter;
yyjson_obj_iter_init(obj, &iter);
yyjson_val *key, *val;
while ((key = yyjson_obj_iter_next(&iter))) {
val = yyjson_obj_iter_get_val(key);
printf("%s: %s\n", yyjson_get_str(key), yyjson_get_type_desc(val));
}
} else {
printf("read error (%u): %s at position: %ld\n", err.code, err.msg, err.pos);
}
// Free the doc
yyjson_doc_free(doc);
// Read the JSON file as a mutable doc
yyjson_doc *idoc = yyjson_read_file("/tmp/config.json", 0, NULL, NULL);
yyjson_mut_doc *doc = yyjson_doc_mut_copy(idoc, NULL);
yyjson_mut_val *obj = yyjson_mut_doc_get_root(doc);
// Remove null values in root object
yyjson_mut_obj_iter iter;
yyjson_mut_obj_iter_init(obj, &iter);
yyjson_mut_val *key, *val;
while ((key = yyjson_mut_obj_iter_next(&iter))) {
val = yyjson_mut_obj_iter_get_val(key);
if (yyjson_mut_is_null(val)) {
yyjson_mut_obj_iter_remove(&iter);
}
}
// Write the json pretty, escape unicode
yyjson_write_flag flg = YYJSON_WRITE_PRETTY | YYJSON_WRITE_ESCAPE_UNICODE;
yyjson_write_err err;
yyjson_mut_write_file("/tmp/config.json", doc, flg, NULL, &err);
if (err.code) {
printf("write error (%u): %s\n", err.code, err.msg);
}
// Free the doc
yyjson_doc_free(idoc);
yyjson_mut_doc_free(doc);
The latest (unreleased) documentation can be accessed in the doc directory. The pre-generated Doxygen HTML for the release version can be viewed here:
A non-exhaustive list of projects that expose yyjson to other languages or use yyjson internally for a major feature. If you have a project that uses yyjson, feel free to open a PR to add it to this list.
Project | Language | Description |
---|---|---|
py_yyjson | Python | Python bindings for yyjson |
orjson | Python | JSON library for Python with an optional yyjson backend |
cpp-yyjson | C++ | C++ JSON library with a yyjson backend |
yyjsonr | R | R binding for yyjson |
Ananda | Swift | JSON model decoding based on yyjson |
duckdb | C++ | DuckDB is an in-process SQL OLAP Database Management System |
RAW
type for JSON reader and writer.This project is released under the MIT license.