realtimetech-solution / kson

Licence: Apache-2.0 License
A Java serialization/deserialization library to convert Java Objects into json and back, faster and powerful then Gson.

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to kson

jackson-js
JavaScript object serialization and deserialization library using decorators. It supports also advanced Object concepts such as polymorphism, Object identity and cyclic objects.
Stars: ✭ 86 (+244%)
Mutual labels:  json-serialization, json-parser, json-deserialization
Mir Ion
WIP, use libmir/asdf package for now
Stars: ✭ 78 (+212%)
Mutual labels:  json-serialization, json-parser
Jsondoc
JSON object for Delphi based on IUnknown and Variant
Stars: ✭ 20 (-20%)
Mutual labels:  json-serialization, json-parser
Spotify Json
Fast and nice to use C++ JSON library.
Stars: ✭ 145 (+480%)
Mutual labels:  json-serialization, json-parser
Fastjson
A fast JSON parser/generator for Java.
Stars: ✭ 23,997 (+95888%)
Mutual labels:  json-serialization, json-parser
Json
JSON for Modern C++
Stars: ✭ 27,824 (+111196%)
Mutual labels:  json-serialization, json-parser
JsonFormatter
Easy, Fast and Lightweight Json Formatter. (Serializer and Deserializer)
Stars: ✭ 26 (+4%)
Mutual labels:  json-serialization, json-parser
Waargonaut
JSON decoding/encoding/manipulation library.
Stars: ✭ 82 (+228%)
Mutual labels:  json-serialization, json-parser
Json Dry
🌞 JSON-dry allows you to serialize & revive objects containing circular references, dates, regexes, class instances,...
Stars: ✭ 214 (+756%)
Mutual labels:  json-serialization, json-parser
Thorsserializer
C++ Serialization library for JSON
Stars: ✭ 241 (+864%)
Mutual labels:  json-serialization, json-parser
domino-jackson
Jackson with Annotation processing
Stars: ✭ 46 (+84%)
Mutual labels:  json-serialization, json-parser
Python Rapidjson
Python wrapper around rapidjson
Stars: ✭ 417 (+1568%)
Mutual labels:  json-serialization, json-parser
Jsoncons
A C++, header-only library for constructing JSON and JSON-like data formats, with JSON Pointer, JSON Patch, JSON Schema, JSONPath, JMESPath, CSV, MessagePack, CBOR, BSON, UBJSON
Stars: ✭ 400 (+1500%)
Mutual labels:  json-serialization, json-parser
Spray Json
A lightweight, clean and simple JSON implementation in Scala
Stars: ✭ 917 (+3568%)
Mutual labels:  json-serialization, json-parser
Easyjson
Fast JSON serializer for golang.
Stars: ✭ 3,512 (+13948%)
Mutual labels:  json-serialization, json-parser
Bfj
MOVED TO GITLAB
Stars: ✭ 164 (+556%)
Mutual labels:  json-serialization, json-parser
representable
Maps representation documents from and to Ruby objects. Includes JSON, XML and YAML support, plain properties and compositions.
Stars: ✭ 689 (+2656%)
Mutual labels:  json-serialization, json-parser
libstud-json
JSON pull-parser/push-serializer library for C++
Stars: ✭ 20 (-20%)
Mutual labels:  json-serialization, json-parser
simple json
Simple way to dynamically convert from and to JSON using build-time generators given a type.
Stars: ✭ 15 (-40%)
Mutual labels:  json-parser
json-parser
🌐 A JSON lexer and parser built according to the official ECMA-404 JSON Data Interchange Standard
Stars: ✭ 24 (-4%)
Mutual labels:  json-parser

This project deprecated, use instead opack

Languages
Korean | English

Kson Logo


Kson

This project is a library developed by REALTIMETECH Solution Division 2.

1. What is Kson?

1.1. Key Function

  • 190% Faster then Gson

    Experience faster Object Serialize, Deserialize, and Json Parse! Kson Logo

  • Supported extended Number, Key Types (Optional)

    Specify ambiguous numeric data, and use Array and Dict as Dict's Key!

  • Automatically serialize Interface / Abstract Class field (Optional)

    Don't worry about the fields in interface, Abstract Class! (List or Map) Kson Logo

  • Make Primary Object (Optional)

    Manage Objects included in multiple objects as one by specifying Primary Key! Kson Logo

1.2. Data Example

Kson is a new data format compatible with the Json standards. It solves the ambiguous number type problem of Json and supports the following data types.

{
   "longValueLower"    : 100l,
   "floatValueLower"   : 100.2f,
   "doubleValueLower"  : 100.2d,

   "longValueUpper"    : 100L,
   "floatValueUpper"   : 100.2F,
   "doubleValueUpper"  : 100.2D,

   "automaticInteger"  : 20,
   "automaticDecimal"  : 10.1

   {
     "A": "B"
   } : "Now, you can use object like a key!",

   ["A", "B"] : "And, array!"
}

2. Usage

2.1. Get Started

2.1.1. Gradle

allprojects {
   repositories {
      maven { url 'https://jitpack.io' }
   }
}

dependencies {
   implementation 'com.github.realtimetech-solution:kson:[Version]'
}

2.1.2. Maven

<repositories>
   <repository>
      <id>jitpack.io</id>
      <url>https://jitpack.io</url>
   </repository>
</repositories>

<dependency>
   <groupId>com.github.realtimetech-solution</groupId>
   <artifactId>kson</artifactId>
   <version>[Version]</version>
</dependency>

2.1.3. Jar

Please refer to the releases part of this repository.

2.2. Usage

2.2.1. Create KsonContext

All Parse, Serialize, Deserialize are available through KsonContext by default.

2.2.1.1. Create Through Builder
KsonBuilder ksonBuilder = new KsonBuilder();

KsonContext ksonContext = ksonBuilder.build();
2.2.1.2. General Creation
KsonContext ksonContext = new KsonContext();
2.2.1.3. Create Through Thread-Safe Pool
KsonBuilder ksonBuilder = new KsonBuilder();
KsonPool ksonPool = new KsonPool(ksonBuilder);

KsonContext ksonContext = ksonPool.get();

2.2.2. Serialize / Deserialize

Kson supports Serialize and Deserialize for String, Object, and JsonValue.

2.2.2.1. String to JsonValue
KsonContext ksonContext = new KsonContext();

String jsonString = "{...}";
JsonValue jsonValue = ksonContext.fromString(jsonString);
2.2.2.2. JsonValue to String
JsonValue jsonValue = ...;
String jsonString = jsonValue.toJsonString(); //Usage of standard Json format.
String ksonString = jsonValue.toKsonString(); //Usage of extended Kson format.
2.2.2.3. Object to JsonValue
KsonContext ksonContext = new KsonContext();

Person personObject = someObject;
JsonValue jsonValue = ksonContext.fromObject(personObject);
2.2.2.4. JsonValue to Object
KsonContext ksonContext = new KsonContext();

JsonValue jsonValue = ...;
Person personObject = ksonContext.toObject(Person.class, jsonValue);
2.2.2.5. String to (JsonValue) to Object
KsonContext ksonContext = new KsonContext();

String jsonString = "{...}";
Person personObject = ksonContext.toObject(Person.class, jsonString);

2.2.3. Ignore / PrimaryKey

Kson supports useful functions through Annotation.

2.2.3.1. Ignore Field
public class Person {
   private int id;
   private String name;
   
   @Ignore
   private byte[] tempArray;
}

Now, 'tempArray' field is not serialized.

2.2.3.1. Primary Key
public class Person {
   @PrimaryKey
   private int id;
   
   private String name;
}

Now, this class's instance is serialize by 'id' field instead.

3. License and Afterword

Kson uses Apache License 2.0. Please, leave your feedback if you have any suggestions!

JeongHwan, Park
+821032735003
[email protected]
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].