and what is the content of the json as the parameter, is there an example? Where is the return value of the query method received?
I do quite not understand your questions.
The format of the JSON is documented in developer documentation Schema JSON representation — Concordium documentation
I do not understand what you mean by “return value of the query method”. Which query method?
For example, there is a balanceOf method in the contract, the parameter is the address, and the return value is the user balance, so how do I get this return value?
For reference (we discussed this in private messages).
The balanceOf function is provided with a callback name (see spec CIS-1: Concordium Token Standard - Interoperability Specifications )
That callback must be an entrypoint of your contract which will be invoked with the result. See concordium-rust-smart-contracts/lib.rs at main · Concordium/concordium-rust-smart-contracts · GitHub
for an example implementation of the method. As you can see it sends a message to the provided entrypoint.