Search code examples
javakryokryonet

How to send data to kryonet outside java


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?


Solution

  • 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());