Mitsunori Komatsu

Results 65 comments of Mitsunori Komatsu

`com.fasterxml.jackson.databind.ObjectMapper` can serialize `org.json.JSONObject`. So you can convert `org.json.JSONObject` instances to MessagePack format like this ``` JSONObject root = new JSONObject(); : ObjectMapper objectMapper = new ObjectMapper(new MessagePackFactory()); byte[] bytes...

@making That's interesting. Thanks for letting us know. I'll take a look at it later.

Sorry for delayed reply. ```java MessageUnpacker unpacker = MessagePack.newDefaultUnpacker(new ByteArrayInputStream(msgpack.getBytes(StandardCharsets.UTF_8))); ``` This looks you handled the serialized MessagePack data as a String. It should be treated as a byte array....

Interesting. I guess, what you want to do is like this? https://github.com/FasterXML/jackson-core/blob/e3574ea3db06c7e69625b5962a34430e89011ac2/src/main/java/com/fasterxml/jackson/core/sym/CharsToNameCanonicalizer.java#L485-L487 Maybe you can use this one as a cache w/o additional dependency https://github.com/FasterXML/jackson-core/blob/e3574ea3db06c7e69625b5962a34430e89011ac2/src/main/java/com/fasterxml/jackson/core/util/InternCache.java#L29

You don't need to instantiate MessagePack object in 0.8. Please see https://github.com/msgpack/msgpack-java/blob/develop/msgpack-core/src/test/java/org/msgpack/core/example/MessagePackExample.java

``` ImmutableValue val = unpacker.unpackValue(); ``` The performance of parsing depends on source data and I didn't get what kind of data this `unpacker` contains. Could you give me reproducible...

I parsed the data with the following code and I couldn't reproduce the performance issue since it took only 60ms ``` byte[] bytes = Files.readAllBytes(Paths.get("/Users/tmp/aaa/data")); long start; ImmutableValue value; {...

Ah, msgpack-java uses `sun.misc.Unsafe` for performance optimization and the class isn't supported in Android . So msgpack-java in Android uses non performance optimized implementation. https://github.com/msgpack/msgpack-java/blob/bef0ccdb9b1be70c533f81e0c459fdef6f578cd2/msgpack-core/src/main/java/org/msgpack/core/buffer/MessageBuffer.java#L87-L92 As you mentioned as question#1,...

> 1 msgpack-java detects the platform by checking some other other things not only the existence of Unsafe https://github.com/msgpack/msgpack-java/blob/bef0ccdb9b1be70c533f81e0c459fdef6f578cd2/msgpack-core/src/main/java/org/msgpack/core/buffer/MessageBuffer.java#L73-L92. I think you need to make `System.getProperty("java.runtime.name")` not to return `Android`...

What do you mean by "strict buffer retention size"?