0

we are trying to create a Android application for an existing java web application and we are trying to access the java JSON data.

we are struck on how to send the JSON data to the request.

we thought of creating an java api and send as response for the request.

Please suggest any solution,

Thanks in Advance.

Shakir
  • 1
  • 3
  • Does this help? https://stackoverflow.com/questions/34555260/android-send-post-json-data-to-server Your WebApplication needs to have an API exposes, such as v1/data Then your AndroidAPP will send JSON strings as a body(payload) into v1/data – JCompetence Aug 18 '21 at 10:46

1 Answers1

0

In Android ecosystem, a de factor solution is to use https://square.github.io/retrofit/ library to achieve so. Instead of dealing with JSON string, you will be dealing with Java representation class.

To convert your JSON String to Java representation class, you may use the tool - https://www.jsonschema2pojo.org/

Cheok Yan Cheng
  • 47,586
  • 132
  • 466
  • 875