Yes! Actually, this is one of the primary “data transfer formats” used on the internet, especially between client-side and server-side code. Where client-side code is JavaScript running in your browser on a web page, and server-side is the server where that client-side interacts with to perform tasks, such as posting on a thread. You can see this behavior in your browser dev tools.
Each programming language usually has its own pros and cons when it comes to how the programmer interacts with it. The differences usually boil down to differences in the syntax, and how the language “runs”.
For example Python general purpose programming language is easy to read, write, and is flexible with a huge number of packages supporting it. However, Python is ran in such a way that it is “interpreted”. So it will “read” the code its about to execute and nothing more, so if you have a bug somewhere deep within your codebase, you wont know about it until runtime.
This is in contrast with a language, such as Java, which is a “compiled” language, which requires a step where you take the code you write, compile it, and then run it. During the compile step, the Java compiler (another program) will read and optimize your code to run on the JVM (Java Virtual Machine), during this time it can also check for errors which can help you prevent bugs later at runtime.
However, both languages have libraries to transfer data in JSON and XML, the data transfer format is independent from the language you used to write the actual program. For example, JSON stands for JavaScript Object Notion, as JSON is based on a subset of JavaScript itself, but that doesn’t mean only JavaScript can manage JSON, but it does make it “easier”.
For some historical context, XML was used as a data transfer before JSON became more popular, now JSON is the primary way of transferring data on the web. This was done because XML used more bytes to send the same information. Neither of these formats works for every case, something like loading an image or streaming video is done differently than using JSON or XML, such as streaming the raw bytes.
Finally, understanding that there are a bunch of ways to communicate between two pieces of code running in different places is one of the main concepts behind the internet in general. All these machines that make up the internet as we know it all need to communicate, and thus need to know how to. So there are these standardized formats that are used between each program. How the program is written and what its running on shouldn’t matter, as long as they follow the standardized protocols.