Skip to content

rweikusat/uni-json

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

828 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Universal Json
==============

JSON is a nice, well-defined data format and it's a real shame that
libraries handling it are so hideously complicated. Further, they (at
least the C libraries I looked at) all suffer from the same design
flaws, namely,

	- they implement some scheme for memory management despite
          they shouldn't

	- they define some sort of data representation for their
          output despite they shouldn't

This is meant to become a small library for parsing JSON text and
formatting some complex object as JSON text with a C core which
delegates anything which requires memory allocation and/ or a data
representation to "someone else" and which can thus be used together
with any other programming language which can interoperate with
compiled C code.

The code is meant to be simple and fast, in that order. It should
rather be easy enough to understand so that one can be reasonably
confident that it actually works than try to shave off every
nanosecond which could conceivably be saved somewhere. In particular,
this means it'll use lookup tables of function pointers instead of
explicit switching logic and employ functional decomposition to break
the task down into semantic units which make sense in the problem
domain. Further, it's to utilize recursive descent for handling nested
structures instead of employing some complicated, explicit stack
management scheme to "avoid recursion."


Features
========

Believed-to-be-complete parser and serializer core written in C.

Language bindings for Perl.

Language bindings for Python.

Installation instructions are in the INSTALL file.

-- Rainer Weikusat <rweikusat@talktalk.net>

About

A small C libary for handling JSON with support for arbitrary language bindings

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors