Is there a standard way to exchange json data (tex...
# announcements
b
Is there a standard way to exchange json data (text) between Kotlin and a Python program ?
m
write the json to a file
b
I mean to send the json data through a TCP socket
r
HTTP would seem like the most common way, using common HTTP server, HTTP client & JSON serialization libs on either side. On the kotlin side, http4k or ktor for HTTP & jackson for JSON are common & will do the job. Python must have equivalents.
m
you’d need to create a server (backend) then on both sides, on Python you can use Flask or FastAPI (django is too much) and on kotlin you can launch a ktor server
on Python you can do the requests through the module
requests
and with kotlin ktor has all the tools for u ready
b
Thank you