<commit_before>DSL-JSON library
================

DSL Platform compatible JSON library for Java and Android.

Java JSON library designed for performance. Built for invasive software composition with DSL Platform compiler.

![JVM serializers benchmark results](https://cloud.githubusercontent.com/assets/1181401/13662269/8c49a02c-e699-11e5-9e46-f98f07fd68ef.png)

## Distinguishing features

 * supports external schema - Domain Specification Language (DSL)
 * works on existing POJO classes via annotation processor - it converts POJO to DSL schema and constructs specialized converters at compile time
 * performance - faster than any other Java JSON library. On pair with fastest binary JVM codecs
 * works on byte level - deserialization can work on byte[] or InputStream. It doesn't need intermediate char representation
 * extensibility - custom types can be registered for serialization/deserialization
 * streaming support - large JSON lists support streaming with minimal memory usage
 * zero-copy operations - converters avoid producing garbage
 * minimal size - runtime dependency weights around 100KB
 * no runtime overhead - both schema and annotation based POJOs are prepared at compile time
 * no unsafe code - library doesn't rely on Java UNSAFE/internal methods
 * legacy name mapping - multiple versions of JSON property names can be mapped into a single POJO using alternativeNames annotation

## Schema based serialization

DSL can be used for defining schema from which POJO classes with embedded JSON conversion are constructed.
This is useful in large, multi-language projects where model is defined outside of Java classes.
More information about DSL can be found on [DSL Platform](https://dsl-platform.com) website.

## @CompiledJson annotation

Annotation processor works by translating Java classes into DSL and running DSL Platform compiler on it.
DSL compiler will generate optimized converters and register them into `META-INF/services`.
This will be loaded during `DslJson` initialization with `ServiceLoader`.
Converters will be created even for dependent objects which don't have `@CompiledJson` annotation.
This can be used to create serializers for pre-existing classes without annotating them.
Both bean properties and public non-final fields are supported.

Annotation processor can be added as Maven dependency with:

    <dependency>
      <groupId>com.dslplatform</groupId>
      <artifactId>dsl-json-processor</artifactId>
      <version>1.4.3</version>
      <scope>provided</scope>
    </dependency>

For use in Android, Gradle can be configured with:

    apply plugin: 'android-apt'
    dependencies {
      compile compile 'com.dslplatform:dsl-json:1.3.3'<commit_msg>Remove duplicate compile keyword from documentation<commit_after>DSL-JSON library
================

DSL Platform compatible JSON library for Java and Android.

Java JSON library designed for performance. Built for invasive software composition with DSL Platform compiler.

![JVM serializers benchmark results](https://cloud.githubusercontent.com/assets/1181401/13662269/8c49a02c-e699-11e5-9e46-f98f07fd68ef.png)

## Distinguishing features

 * supports external schema - Domain Specification Language (DSL)
 * works on existing POJO classes via annotation processor - it converts POJO to DSL schema and constructs specialized converters at compile time
 * performance - faster than any other Java JSON library. On pair with fastest binary JVM codecs
 * works on byte level - deserialization can work on byte[] or InputStream. It doesn't need intermediate char representation
 * extensibility - custom types can be registered for serialization/deserialization
 * streaming support - large JSON lists support streaming with minimal memory usage
 * zero-copy operations - converters avoid producing garbage
 * minimal size - runtime dependency weights around 100KB
 * no runtime overhead - both schema and annotation based POJOs are prepared at compile time
 * no unsafe code - library doesn't rely on Java UNSAFE/internal methods
 * legacy name mapping - multiple versions of JSON property names can be mapped into a single POJO using alternativeNames annotation

## Schema based serialization

DSL can be used for defining schema from which POJO classes with embedded JSON conversion are constructed.
This is useful in large, multi-language projects where model is defined outside of Java classes.
More information about DSL can be found on [DSL Platform](https://dsl-platform.com) website.

## @CompiledJson annotation

Annotation processor works by translating Java classes into DSL and running DSL Platform compiler on it.
DSL compiler will generate optimized converters and register them into `META-INF/services`.
This will be loaded during `DslJson` initialization with `ServiceLoader`.
Converters will be created even for dependent objects which don't have `@CompiledJson` annotation.
This can be used to create serializers for pre-existing classes without annotating them.
Both bean properties and public non-final fields are supported.

Annotation processor can be added as Maven dependency with:

    <dependency>
      <groupId>com.dslplatform</groupId>
      <artifactId>dsl-json-processor</artifactId>
      <version>1.4.3</version>
      <scope>provided</scope>
    </dependency>

For use in Android, Gradle can be configured with:

    apply plugin: 'android-apt'
    dependencies {
      compile 'com.dslplatform:dsl-json:1.3.3'
{'fraction_non_alphanumeric': 0.0594059405940594, 'fraction_numerical': 0.016134946828016136, 'mean_word_length': 4.6645898234683285, 'pattern_counts': {'":': 0, '<': 23, '<?xml version=': 0, '>': 23, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1932304', 'n_tokens_mistral': 1381, 'n_tokens_neox': 1270, 'n_words': 637}