GithubHelp home page GithubHelp logo

djevko.h's Introduction

[EXPERIMENTAL]

djevko.h

A variant of Jevko implemented in C which differs from the original in that:

Features

  • single-header library: simply #include "djevko.h" and use!
  • provides utility functions to help with (de)serialization, escaping, checking, converting, etc.
  • should be fairly fast (yet to be benchmarked)
  • binary data can be mixed with text data
  • human readable and writable
  • super minimal and flexible

Example

An example piece of data like:

name [Jon Wąpierz 😀]
age [32]
is cool [true]
fav colors [
  [red]
  [green]
  [blue]
]

can be parsed into C structs like:

typedef struct {
  char** colors;
  Size len;
} FavColors;

typedef struct {
  char* name;
  int age;
  Bool is_cool;
  FavColors fav_colors;
} Person;

And the other way around.

Usage

All you need is djevko.h.

See example.c.

It shows how to (de)serialize C structs/arrays/strings/numbers/booleans to/from Djevko.

You can compile and run the example with:

gcc example.c && ./a.out 

djevko.h's People

Contributors

djedr avatar

Stargazers

Gerardo Lisboa avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.