How to prevent Java from separating JSON strings passed as command-line parameters into single subunits of args []
•
Java
I want to pass this JSON string to the Java class through command - line arguments
However, in each space, the string is split So args [0] is
Args [1] is
wait
I want args [0] to be
I tried to use double quotes, but it was invalid because there were quotes in the JSON string
How can I do this? Thank you.
Solution
This is a better solution:
>Stop passing JSON as a command line parameter. > Put JSON in a file. > Pass the name of the JSON file as a command line parameter. > Read the JSON file in the application
The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
二维码