简体   繁体   English

将数据写入 JSON 文件,将 JSON 文件从客户端发送到服务器,读取 JSON

[英]Write data in JSON file, send JSON file from client to server, read JSON

I have a client/server application, the Client is an Android Application developed with Android Studio and and Server is a classic Java Application.我有一个客户端/服务器应用程序,客户端是一个用 Android Studio 开发的 Android 应用程序,而服务器是一个经典的 Java 应用程序。

Here the screens of interested parts:这里是感兴趣部分的屏幕:

Client:客户:

在此处输入图片说明

Server:服务器:

在此处输入图片说明

Now what i need is that when i click on button "RICHIEDI" in android application (client), the fields Nome and Cognome gone write on a JSON file and this JSON sent to server and then the Nome and Cognome shows in the two jtextfield of the server application, how can i do it?现在我需要的是,当我点击 android 应用程序(客户端)中的按钮“RICHIEDI”时,Nome 和 Cognome 字段写在一个 JSON 文件上,这个 JSON 发送到服务器,然后 Nome 和 Cognome 显示在两个 jtextfield服务器应用程序,我该怎么做? can you help me?你能帮助我吗?

从这里在http://jsonschema2pojo.org/ 中创建您的 json 对象,然后发送到您的服务器,也像这样处理响应

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

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