I currently need to resolve an issue with duplicated logic on web-based monitoring (Java) and a big legacy C server app.
For this I need to build new clients for the C app, but I have no idea what formats are good for Java to read.
Should I use XML, Json, or some other format?
The answer is completely dependent on your problem domain. Java has libraries available for reading XML, JSON and a host of other protocols.
You need to be asking questions like: