diff --git a/README.md b/README.md index 9a7c9af..4847f26 100644 --- a/README.md +++ b/README.md @@ -31,6 +31,7 @@ It covers the following libraries: * [qson](https://github.com/quarkusio/qson) * [tapestry](https://tapestry.apache.org/json.html) * [underscore-java](https://github.com/javadev/underscore-java) +* [wast](https://github.com/wycst) When available, both databinding and 'stream' (custom packing and unpacking) implementations are tested. Two different kinds of [models](/src/main/java/com/github/fabienrenaud/jjb/model/) are evaluated with payloads of 1, 10, diff --git a/src/main/java/com/github/fabienrenaud/jjb/databind/Deserialization.java b/src/main/java/com/github/fabienrenaud/jjb/databind/Deserialization.java index 2d6612d..6e93923 100644 --- a/src/main/java/com/github/fabienrenaud/jjb/databind/Deserialization.java +++ b/src/main/java/com/github/fabienrenaud/jjb/databind/Deserialization.java @@ -5,6 +5,7 @@ import com.github.fabienrenaud.jjb.JsonBench; import com.github.fabienrenaud.jjb.data.JsonSource; import com.google.gson.JsonSyntaxException; +import io.github.wycst.wast.json.options.ReadOption; import org.openjdk.jmh.annotations.Benchmark; import java.io.IOException; @@ -147,6 +148,6 @@ public Object quickbuf_json() throws Exception { @Benchmark @Override public Object wast() throws Exception { - return io.github.wycst.wast.json.JSON.parseObject(JSON_SOURCE().nextString(), JSON_SOURCE().pojoType()); + return io.github.wycst.wast.json.JSON.parseObject(JSON_SOURCE().nextString(), JSON_SOURCE().pojoType(), ReadOption.UseJDKDoubleParser); } } diff --git a/src/main/java/com/github/fabienrenaud/jjb/databind/Serialization.java b/src/main/java/com/github/fabienrenaud/jjb/databind/Serialization.java index 9f82267..03ea550 100644 --- a/src/main/java/com/github/fabienrenaud/jjb/databind/Serialization.java +++ b/src/main/java/com/github/fabienrenaud/jjb/databind/Serialization.java @@ -5,6 +5,7 @@ import com.github.fabienrenaud.jjb.JsonBench; import com.github.fabienrenaud.jjb.JsonUtils; import com.github.fabienrenaud.jjb.data.JsonSource; +import io.github.wycst.wast.json.options.WriteOption; import okio.BufferedSink; import okio.Okio; import org.openjdk.jmh.annotations.Benchmark; @@ -179,7 +180,7 @@ public Object quickbuf_json() throws Exception { @Override public Object wast() throws Exception { ByteArrayOutputStream baos = JsonUtils.byteArrayOutputStream(); - io.github.wycst.wast.json.JSON.writeJsonTo(JSON_SOURCE().nextPojo(), baos); + io.github.wycst.wast.json.JSON.writeJsonTo(JSON_SOURCE().nextPojo(), baos, WriteOption.WriteDecimalUseToString); return baos; } }