• Stars
    star
    278
  • Rank 142,976 (Top 3 %)
  • Language
    C++
  • License
    GNU Lesser Genera...
  • Created over 11 years ago
  • Updated 8 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

QJson is a qt-based library that maps JSON data to QVariant objects.

QJson Build Status

JSON (JavaScript Object Notation) is a lightweight data-interchange format. It can represents integer, real number, string, an ordered sequence of value, and a collection of name/value pairs.

QJson is a qt-based library that maps JSON data to QVariant objects. JSON arrays will be mapped to QVariantList instances, while JSON's objects will be mapped to QVariantMap.

Install

QJson requires:

  • Qt 4.5 or greater
  • cmake 2.6 or greater

Some possible cmake options:

  • -DCMAKE_BUILD_TYPE=DEBUG: enables some debug output (other than making easier to debug the code)
  • -DQJSON_BUILD_TESTS=yes or -DKDE4_BUILD_TESTS=yes: builds the unit tests
  • -DCMAKE_INSTALL_PREFIX=${HOME}/testinstall: install qjson in a custom directory
  • -DCMAKE_INCLUDE_PATH=${HOME}/testinstall/include: include a custom include directory
  • -DCMAKE_LIBRARY_PATH=${HOME}/testinstall/lib: include a custom library directory
  • -DLIB_DESTINATION=lib64: if you have a 64 bit system with separate libraries for 64 bit libraries
  • -DQJSON_VERBOSE_DEBUG_OUTPUT:BOOL=ON: more debugging statements are generated by the parser. It's useful only if you are trying to fix the bison grammar.

For Unix/Linux/Mac:

mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX=_preferred_path_ ..
make
make install
/sbin/ldconfig #if necessary

Contribute

The recommended way to submit your changes is via a pull request.

Before submitting a patch please ensure:

  • Patched code compiles.
  • The patch is fixing a specific issue or implementing a new feature (it’s not doing multiple things at the same time).
  • QJson unit tests have been updated.
  • QJson unit tests are passing.

Unit testing

QJson unit tests are located under the tests directory. You can enable them passing the -DQJSON_BUILD_TESTS=yes option to cmake.

Note well: make sure you followed the build instructions.

To run all the unit tests move into the build directory and type:

make tests

If you want to run the QJson::Parser unit tests just type:

./test/parser/testparser

If you want to run the QJson::Serializer unit tests just type:

./test/serializer/testserializer

If you want to run the QJson::QObjectHelper tests just type:

./tests/qobjecthelper/testqobjecthelper

If you want to test the QJson parser against a specific JSON object you can use the cmdline_tester program.

This binary is located under the tests directory and has a straightforward syntax:

./tests/cmdline_tester/cmdline_tester text_file_containing_json_object

The command will convert the JSON object to a QVariant and dump it to stdout. More options are available via cli options, just checkout the --help output.

Note well: cmdline_tester relies on qDebug() to dump the object. qDebug has some limitations, like being unable to print utf8 chars.

License

This library is licensed under the Lesser GNU General Public License version 2.1. See the COPYING.lib file for more information.

Resources

More Repositories

1

jump

a bookmarking system for the bash shell
Ruby
142
star
2

kuberlr

A tool that simplifies the management of multiple versions of kubectl
Go
91
star
3

kube-image-bouncer

Simple endpoint for the ImagePolicyWebhook and the GenericAdmissionWebhook Kubernetes admission controllers
Go
75
star
4

hermit-wasm

A Unikernel running WebAssembly code
Rust
44
star
5

collage

read-only docker registry made of images coming from different locations
Go
23
star
6

krew-wasm

krew-wasm offers a way to write and distribute kubectl plugins based on WebAssembly
Rust
14
star
7

plexamp-flatpak

A flatpak for the official Plexamp app
Makefile
10
star
8

kaveau

Easy to use and fully integrated backup solution for KDE
C++
9
star
9

salt-kubernetes-demo

Demo of kubernetes-salt integration
Python
9
star
10

wapc-guest-dotnet

A waPC guest for .NET
C#
9
star
11

fresh-container

fresh-container brings semantic versioning checks to the world of containers
Go
7
star
12

obs2vagrant

Turn Open Build Service into a simple Vagrant catalog
Go
7
star
13

docker-orchestration-demo

Demo environment created with Vagrant and openSUSE to test Docker orchestration tools.
SaltStack
6
star
14

rockmarble

rockmarble is a MeeGo app that allows you to find good live music. You can either follow your favourite artists or find new ones.
C++
6
star
15

scsgate

A python module to interact with the SCSGate device
Python
5
star
16

kubectl-decoder

A kubectl pluging that decodes Kubernetes Secrets - done with WebAssembly and WASI
Rust
4
star
17

dotfiles

Repo containing all my dot files
Vim Script
3
star
18

kubectl-kubewarden

An experimental kubectl plugin for kubewarden
Rust
3
star
19

guestbook-go

Simple guestbook built using Go and Vue.js
Go
3
star
20

xesamclient

Qt library for accessing Xesam services
C++
2
star
21

k3s-aws-sles

A simple terraform deployment to create a k3s infrastructure on AWS, using SUSE SLE as OS
HCL
2
star
22

cel-evaluator-poc

A POC that uses Common Expression Language (CEL) constraints to validate free-form JSON input
C++
2
star
23

organization-operator

A kubernetes operator that manages Organization and Space CR. Useful to partition a single kubernetes cluster
Go
2
star
24

opensuse-lx-zone

Experimental lx branded zone for openSUSE 42.2 Leap
Shell
2
star
25

kcd-italy-demo

Demo for Kubernetes Comminity Day Italy 2021
Go
1
star
26

tinygo-wasi-symbol-bug

This repository contains the code required to reproduce a tinygo linker issue
Go
1
star
27

policy-secure-pod-images

Container image verification
Rust
1
star
28

Delegator

A simple rails app that gives you infinite openid identities
Ruby
1
star
29

hpcalc

HpCalc is an open-source multi-platform editor for the Hp 39G calculator.
C++
1
star
30

sinatra-coffee-script-template

Ruby
1
star
31

gentoo_doc_checker

Gentoo Documentation Checker
Perl
1
star
32

krew-wasm-plugin-sdk-rust

krew-wask plugin Rust SDK
Rust
1
star
33

dister

Heroku like solution for SUSE Studio
1
star
34

fast_user_switch

A KDE plasmoid that allows to switch between user sessions.
C++
1
star
35

suse_loves_docker_demo

A simple webapp used during Docker demos at SUSE
Go
1
star
36

kubecon-eu-2022-demo

Demo for https://sched.co/ytoY
Go
1
star
37

active_resource_test_helper

Makes ActiveResource testing easier.
Ruby
1
star
38

rancher-project-info-propagator

A controller that propagates Rancher Projet labels to its children Namespace objects
Rust
1
star