Skip to content

Commit

Permalink
Gradle/Jitpack
Browse files Browse the repository at this point in the history
  • Loading branch information
a-hansen authored Jul 14, 2018
1 parent 4246800 commit 7ddc8dd
Show file tree
Hide file tree
Showing 5 changed files with 48 additions and 27 deletions.
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
.gradle
.idea
build
TODO.txt
*.aon
*.iml
build
31 changes: 16 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,22 @@
Aon
===

* Version: 5.0.0
[![](https://jitpack.io/v/a-hansen/alog.svg)](https://jitpack.io/#a-hansen/aon/+)
* JDK 1.6+
* [ISC License](https://en.wikipedia.org/wiki/ISC_license)
* [Javadoc](https://a-hansen.github.io/aon/javadoc)
* [Javadoc](https://jitpack.io/com/github/a-hansen/aon/v5.0.0/javadoc/)

Overview
--------

Aon is another object notation like JSON except is it more compact,
has more data types, and preserves the order of object members. To be
stream friendly, Aon doesn't encode object or list lengths.
Aon is two things:

* Another object notation like JSON.
* A streaming parser generator for the JSON and Aon formats.
* An [API](#java-library) like JSONObject for dealing with data in memory.

The Aon format is like JSON except is it more compact, has more data
types, and preserves the order of object members. To be stream
friendly, Aon doesn't encode object or list lengths.

#### Compact
Uses a binary encoding that borrows techniques from
Expand Down Expand Up @@ -43,11 +48,6 @@ Comparing Formats
{"name":"aon","born":20180602,"cool":true}
```

**MsgPack** (26 bytes)
```
0x83 0xA4 name 0xA3 aon 0xA4 born 0xCE 0x01 0x33 0xEE 0x7A 0xA4 cool 0xC3
```

**UBJSON** (32 bytes)
```
{ i 0x04 name s i 0x03 aon i 0x04 born I 0x01 0x33 0xEE 0x7A i 0x04 cool T }
Expand All @@ -58,6 +58,11 @@ Comparing Formats
{ 0xA4 name 0xA3 aon 0xA4 born j 0x01 0x33 0xEE 0x7A 0xA4 cool T }
```

**MsgPack** (26 bytes)
```
0x83 0xA4 name 0xA3 aon 0xA4 born 0xCE 0x01 0x33 0xEE 0x7A 0xA4 cool 0xC3
```

Format
------

Expand Down Expand Up @@ -288,14 +293,10 @@ public Aobj decode() throws IOException {
try (AonReader reader = Aon.reader(new File("data.aon"))) {
return reader.getObj();
}

//or Aon.read(new File("data.aon"))
}

public void encode(Aobj obj) throws IOException {
Aon.writer(new File("data.aon")).value(obj).close();

//or Aon.write(obj, new File("data.aon"))
}
```

Expand Down
38 changes: 29 additions & 9 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@ repositories {
}

dependencies {
testCompile 'com.fasterxml.jackson.core:jackson-core:+'
testCompile 'com.fasterxml.jackson.core:jackson-databind:+'
testCompile 'com.google.code.gson:gson:+'
testCompile 'com.googlecode.json-simple:json-simple:+'
testCompile 'com.owlike:genson:+'
testCompile 'net.sf.flexjson:flexjson:+'
testCompile 'org.openjdk.jmh:jmh-core:+'
testCompile 'org.openjdk.jmh:jmh-generator-annprocess:+'
testCompile 'junit:junit:+'
testImplementation 'com.fasterxml.jackson.core:jackson-core:+'
testImplementation 'com.fasterxml.jackson.core:jackson-databind:+'
testImplementation 'com.google.code.gson:gson:+'
testImplementation 'com.googlecode.json-simple:json-simple:+'
testImplementation 'com.owlike:genson:+'
testImplementation 'net.sf.flexjson:flexjson:+'
testImplementation 'org.openjdk.jmh:jmh-core:+'
testImplementation 'org.openjdk.jmh:jmh-generator-annprocess:+'
testImplementation 'junit:junit:+'
}

test {
Expand All @@ -37,3 +37,23 @@ task benchmark(type: Test) {
includeTestsMatching "com.comfortanalytics.aon.AonBenchmark"
}
}

task wrapper(type: Wrapper) {
gradleVersion = '4.8.1'
}

task sourcesJar(type: Jar, dependsOn: classes) {
classifier = 'sources'
from sourceSets.main.allSource
}

task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
from javadoc.destinationDir
}

artifacts {
archives sourcesJar
archives javadocJar
}

Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.8-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-4.8.1-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists

0 comments on commit 7ddc8dd

Please sign in to comment.