简体   繁体   English

如何从Python(客户端)向Java(服务器)发送数组?

[英]How to send an array from Python (client) to Java (Server)?

I am using OpenCV on my Raspberry Pi to track circular objects. 我在我的Raspberry Pi上使用OpenCV来跟踪圆形对象。 Then, I want to send the coordinate and radius values in an array of floats across the LAN to the Java program 然后,我想将LAN中浮点数组中的坐标和半径值发送到Java程序

I can send strings all fine with the code I have, but I'm having trouble trying to send numerical datatypes. 我可以使用我的代码发送字符串,但是我在尝试发送数值数据类型时遇到了麻烦。 What is the correct process for this? 这是正确的过程是什么?

元答案将是使用JSON,因为可以为每种主要编程语言找到JSON生成器和解析器。

Have you looked at BSON? 你看过BSON了吗? It's like JSON, but optimised for a little more speed. 它就像JSON,但针对更快的速度进行了优化。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM