How to send data to kryonet outside java

173 views Asked by At

trying to understand how to work with kryonet, it is quite easy to send and receive message from java client, but what if I want to send it from some UI tool like Hercules, or not java code. As I see it uses kryo for Serialization, is there way to serialize object to this fromat without java? Or use plain String or json for comunication?

1

There are 1 answers

0
Sebastian On BEST ANSWER

You can easily create a server using json instead of kryo:

import com.esotericsoftware.kryonet.Server;
import com.esotericsoftware.kryonet.serialization.JsonSerialization;

new Server(16384, 2048, new JsonSerialization());