Git Product home page Git Product logo

mjson's Introduction

mJson is an extremely lightweight Java JSON library with a very concise API. The source code is a single Java file. The license is Apache 2.0. Because of its tiny size, it's well-suited for any application aiming at a small footprint such as mobile/Android applications.

It was originally developed in the context of the OpenCiRM project. There is a graph database based persistent layer for mJson implemented at the HyperGraphDB Project. This means you can transparently persist and query JSON documents like in document-oriented databases (MongoDB, CouchDB), but you don't have split documents into separate collection or create special purposes indices since all documents and properties are automatically interlinked.

Features

  • Full support for JSON Schema Draft 4 validation
  • Single universal type - everything is a Json, no type casting
  • Single factory method, no new operators, just call Json.make(anything here)
  • Fast, hand-coded parsing
  • Designed as a general purpose data structure for use in Java
  • Parent pointers and up method to traverse the JSON structure
  • Concise methods to read (Json.at), modify (Json.set, Json.add), duplicate (Json.dup), merge (Json.with)
  • Methods for type-check (e.g. Json.isString()) and access to underlying Java value (e.g. Json.asString())
  • Method chaining
  • Pluggable factory to build your own support for arbitrary Java<->Json mapping
  • 1 Java file is the whole library with no external dependencies

API Tour

Go see a Complete Tour of the API

Read my tutorial blog on JSON Schema

Wish List

(get in touch if you want to help!)

  1. Traversal API, with pattern-matching
  2. Extend JSON Schema support for template generation

Goto mJson Official Website

mjson's People

Contributors

bolerio avatar unserializable avatar blyefd avatar

Watchers

Rupesh Bhochhibhoya 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.