I'm trying to use the newDefaultUnpacker
static method of the MessagePack
class like this:
import org.msgpack.MessagePack;
Map<Value, Value> map = MessagePack.newDefaultUnpacker(myByteArray).unpackValue().asMapValue().map();
however I get the error:
The method newDefaultUnpacker(byte[]) is undefined for the type MessagePack
Initially I created the following Maven dependency:
<dependency>
<groupId>org.msgpack</groupId>
<artifactId>msgpack</artifactId>
<version>0.6.12</version>
</dependency>
Changing it to this (or adding this in addition to the previous dependency) doesn't work.
<dependency>
<groupId>org.msgpack</groupId>
<artifactId>msgpack-core</artifactId>
<version>0.8.16</version>
</dependency>
What do I need to do to successfully reference newDefaultUnpacker
? I don't get any hints that suggest a particular import that I should add, and import org.msgpack.core
isn't recognised i.e. the package doesn't exist.